Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default To return the column number of a string

Hello All,
I am pretty new to Excel Macros. I was writing a code and stuck up
with this problem.
I want to write the code to return the column number of a particular
string.
Like, I have "VET" string in one of the cells, A20

My code has to return to the column number 1 for the string "VET"

Please help,
Thanks,
Prasanna.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default To return the column number of a string

Once you have established your string is in A20 then you return the column
number of the cell:-

x = Range("A20").Column

Mike

" wrote:

Hello All,
I am pretty new to Excel Macros. I was writing a code and stuck up
with this problem.
I want to write the code to return the column number of a particular
string.
Like, I have "VET" string in one of the cells, A20

My code has to return to the column number 1 for the string "VET"

Please help,
Thanks,
Prasanna.


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
To return the column number of a string [email protected] Excel Worksheet Functions 0 June 28th 07 07:02 PM
Look up values in a column and return ALL corresponding row number Ima Nidiot New Users to Excel 2 January 9th 07 02:51 PM
In a column of numbers, how do I return the last non-zero number? ACEACE Excel Discussion (Misc queries) 4 March 15th 06 08:36 PM
Column() to return a letter instead of a number? cKBoy Excel Worksheet Functions 16 February 17th 06 04:50 AM
How to count the number of times a string appears in a column? btsray Excel Worksheet Functions 0 January 25th 06 10:15 PM


All times are GMT +1. The time now is 03:17 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"