Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi...
I am learning about writing macros. I always stuck up at one point. I need to do various activies on columns based on their headings. e.g. I have to replace all "NA" in the column whose heading is "TOWN". Currently I write the macro using column number. But if the columns gets shifted, then this macro will not work. How can I extract column number by identifying its heading? Regards, Pawan |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
colNo = Application.Match("TOWN",Rows(1),0))
and use colNo. -- __________________________________ HTH Bob "Pawan" wrote in message ... Hi... I am learning about writing macros. I always stuck up at one point. I need to do various activies on columns based on their headings. e.g. I have to replace all "NA" in the column whose heading is "TOWN". Currently I write the macro using column number. But if the columns gets shifted, then this macro will not work. How can I extract column number by identifying its heading? Regards, Pawan |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thats perfect...
Thanks Bob.. :-) "Bob Phillips" wrote: colNo = Application.Match("TOWN",Rows(1),0)) and use colNo. -- __________________________________ HTH Bob "Pawan" wrote in message ... Hi... I am learning about writing macros. I always stuck up at one point. I need to do various activies on columns based on their headings. e.g. I have to replace all "NA" in the column whose heading is "TOWN". Currently I write the macro using column number. But if the columns gets shifted, then this macro will not work. How can I extract column number by identifying its heading? Regards, Pawan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Column Headers | Excel Discussion (Misc queries) | |||
make column values column headers | Excel Discussion (Misc queries) | |||
Excel - returning column headers in a seperate column | Excel Discussion (Misc queries) | |||
Column and row headers | Excel Discussion (Misc queries) | |||
column headers | Excel Discussion (Misc queries) |