Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Record a macro while doing this:
Select your columns InsertNameCreate check Top row Include this in your code Now you can refer to the columns: ..Range("Caption2") -- Kind regards, Niek Otten "Radu" wrote in message oups.com... Thank you, Ross.... What I need is this: In a module (VBA code) I need to be able to refer to columns in my spreadsheet not by position, since the user might change the columns' order, but by Caption (the caption is NOT negociable). So in the first row I have the captions, like Caption 1 Caption 2 Caption 3 and in the subsequent rows I have the data: a b c d e f I need to be able to write in code NOT .Columns(2), NOT columns ("B"), since the columns might move, but .Columns("Caption 2")... Radu |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I refer to other macros inside a macro code? | Excel Programming | |||
How to refer to a cell format code? | Excel Discussion (Misc queries) | |||
Refer to Worksheet Ranges in Code | Excel Programming | |||
More then 1 Excel object running at same time , how can I refer to right one in code? | Excel Programming | |||
refer to the sheets Name property in my code (not what is on the Tab) | Excel Programming |