Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You would first have to define the range of headers. Then search that range
for the header text using Find. That will give you a column number that you can assign to a variable, say ColNum. Then your code has to be re-written to something like: Set Rng = Range(Cells(2,ColNum), Cells(2,ColNum).End(xlDown)). Please post back if this doesn't work for you or if you need more. HTH Otto "DJS" wrote in message ... Hello~ ~~~~~~~~~~~~~~ Here is a snippet of my code: Set rng = Range(Range("J2"), Range("J2").End(xlDown)) ~~~~~~~~~~~~~~ Instead of referencing Column J (as above), I would like to find the correct Column based on the name of the column header (in this case it is "VIN"). Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Return column header based on last value in row | Excel Worksheet Functions | |||
Returning Column Header based on Row and Value | New Users to Excel | |||
pick from table based on row and column header | Excel Worksheet Functions | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
macro to hide column based on header | Excel Programming |