Excel: INPUT() Function Storing a Reference

ID: Q24630


SUMMARY

When selecting a group of cells within an Input dialog box whose type is 8, the reference of the selection is displayed in the dialog box. However, when using the input results in another command in the macro, the reference is not seen as text and does not calculate properly.

To use the reference later, it must be saved as a text string. To save it as a text string when you run the macro, perform the following steps:

  1. When the Input dialog box appears, select the desired cells.


  2. Press BACKSPACE or DELETE.


  3. Click OK.


An alternative method is to embed the INPUT() function in a SET.NAME() function. For example, the following command will define a name of "ref" to the results of the Input dialog box:


   =SET.NAME("ref",INPUT("Select a cell",8)) 


"ref" could then be used in later macro commands in place of a reference to the INPUT() function.

Additional query words:


Keywords          : 
Version           : 
Platform          : 
Issue type        : 

Last Reviewed: March 10, 1999