• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Can I "find" (or search) a text string & use the column number as my variable ?

Say Row 1 Column 8 (A8) has the title "STARTING RANGE".

Can I use VBA code to search Row 1 for the exact word "STARTING RANGE" and use that column number (8) as my Integer Variable ? If someone starts moving the spreadsheet around I don't want to have to manually change the code every time to use a new column number

P.S. I can't put a name on the cell (A8) and look for that - which is what I have done previously, as this data set gets exported from an external source (which is not uniform).

Appreciate any suggestions.
Thanks
JT
 

Hi !

I often use a named cell …
Anyway, you can use Find method or MATCH worksheet function.
 
Back
Top