Insert, Name

I've have driven myself nuts trying to get tis to do anything. I would like to name a range of cells and then use that name in formulas and macros. What am I mising? Thanks! You folks are a Godsend.
pubbuddyAsked:
Who is Participating?
 
byundtCommented:
In Excel 2003 and earlier, you create a named range using the Insert...Name...Define menu item.
1) Select the desired cells
2) In the Insert menu, choose Name, then click the arrow to its right and choose Define
3) Put the desired name in the "Names in workbook" field at the top
4) Click OK

You can then use that name in a worksheet formula. If you want to use it in a macro, you must enclose it in square braces. If the name is DataTable, then you might use it like this:

=VLOOKUP(A1,DataTable,3,FALSE)           worksheet formula

Sub MyMacro()
MsgBox [DataTable].Address       'Display the address of named range DataTable
End Sub


Brad
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.