Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I find a specific characters position in a string variable

Hi
I need to find the position of a particular character in a string variable
within a macro.

I can do this using the command =FIND(" ",B2) in an excel sheet to return
the position of the first space in the string in Cell B2.

What is the equivilent in VBA?

I am using Excel XP (2002)

Thanks
Paul

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default How do I find a specific characters position in a string variable

i = instr(string, what)

HTH
--
AP

" a
écrit dans le message de
...
Hi
I need to find the position of a particular character in a string variable
within a macro.

I can do this using the command =FIND(" ",B2) in an excel sheet to return
the position of the first space in the string in Cell B2.

What is the equivilent in VBA?

I am using Excel XP (2002)

Thanks
Paul



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default How do I find a specific characters position in a string variable

excelmastery?!!?

Dude. You've totally got to get with inStr(). You will know bounty!!



" wrote:

Hi
I need to find the position of a particular character in a string variable
within a macro.

I can do this using the command =FIND(" ",B2) in an excel sheet to return
the position of the first space in the string in Cell B2.

What is the equivilent in VBA?

I am using Excel XP (2002)

Thanks
Paul

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I find a specific characters position in a string varia

David
Worked great, I new it would be simple but I normally do financial models
and work with numbers not text.
Thanks
Paul

"David" wrote:

excelmastery?!!?

Dude. You've totally got to get with inStr(). You will know bounty!!



" wrote:

Hi
I need to find the position of a particular character in a string variable
within a macro.

I can do this using the command =FIND(" ",B2) in an excel sheet to return
the position of the first space in the string in Cell B2.

What is the equivilent in VBA?

I am using Excel XP (2002)

Thanks
Paul

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
How to find a text in a string without giving the position of the Sreekanth Excel Discussion (Misc queries) 2 April 15th 10 09:07 PM
Text String - Specific Characters Kiser Excel Worksheet Functions 6 February 10th 06 02:43 AM
find nth position of a string TUNGANA KURMA RAJU Excel Discussion (Misc queries) 6 October 18th 05 01:25 PM
find position of a number in a string fullers80 Excel Worksheet Functions 1 September 6th 05 03:47 PM
How find character position # in string from right end? Or how get range row num Ian Elliott[_3_] Excel Programming 1 December 17th 03 03:56 PM


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