![]() |
Find Column to use based on Name of Header
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. |
All times are GMT +1. The time now is 12:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com