Get column reference after string found

L

Les Stout

Hi all, i need to find a string on a spreadsheet and once found i need
to get the column that it is in. Could anybody help me with some code
please ?
I have the find string code, i just need to know how to get the column
that the string is in.


Best regards,

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
 
R

ryguy7272

Let's say you are searching for WW02 and/or WWO3, use this function:
=ADDRESS(MATCH("WW02",A1:A4,0),MATCH("WW03",A1:D1,0))

The items in quotes are the strings; you can use one or both (I think you
only need one for your purposes...)

Regards,
Ryan---
 
R

Rick Rothstein \(MVP - VB\)

Showing the code would have been helpful. If that code is finding the Cell
(as a range) that the text is in, then just affix .Column (note the leading
dot) after that range to get the column.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top