Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Get column reference after string found

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 ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Get column reference after string found

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---
--
RyGuy


"Les Stout" wrote:

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 ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Get column reference after string found

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


"Les Stout" wrote in message
...
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 ***


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Get column reference after string found

Perfect Rick thank you so much.

Best regards,

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding string and color the found string Agustus Excel Programming 1 September 20th 06 07:51 PM
URGENT -- search in string for a value in another column, if found, return value from next column samkshah Excel Programming 4 October 3rd 05 04:13 PM
Search column - return row found in long text string JayL Excel Programming 1 March 5th 05 03:23 AM
get linenumber when string found in VBE codemodule RB Smissaert Excel Programming 11 October 10th 04 09:56 AM
Highlight found text string in cell? Ed[_18_] Excel Programming 4 June 4th 04 03:07 PM


All times are GMT +1. The time now is 03:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"