Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Finding a particular character in a string using VBA

As it reads in the heading...

I tried to use Application.Find but that doesn't seem to be available.

I need to find the location of the first space in a character string.
Is there any easy way to do this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Finding a particular character in a string using VBA

Hi Marston,

Sub Tester()
Dim sStr As String
Dim pos As Long
sStr = "ABC DEF"
pos = InStr(sStr, " ")
MsgBox pos
End Sub

--

---
Regards,
Norman



" wrote in message
...
As it reads in the heading...

I tried to use Application.Find but that doesn't seem to be available.

I need to find the location of the first space in a character string.
Is there any easy way to do this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Finding a particular character in a string using VBA


Application.Find is the VBA equivalent of going to the Edit menu and selecting
Find. As Norman says, you use Instr for the equivalent of the worksheet
function FIND.

On 13 Sep 2004 17:41:33 -0700, "
wrote:

As it reads in the heading...

I tried to use Application.Find but that doesn't seem to be available.

I need to find the location of the first space in a character string.
Is there any easy way to do this?


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
Pull string before a certain character Sandra[_2_] Excel Discussion (Misc queries) 3 April 3rd 23 02:10 PM
Counting No of character in a string Chandrashekar B Excel Worksheet Functions 1 October 28th 09 06:44 AM
Finding a Character in a String Using VBA BVass Excel Discussion (Misc queries) 2 April 9th 09 03:52 AM
Finding a character in a text string (take3) Bulent Excel Discussion (Misc queries) 2 October 31st 07 02:35 PM
Excel-Match 1st text character in a string to a known character? bushlite Excel Worksheet Functions 2 January 15th 07 06:36 PM


All times are GMT +1. The time now is 04:07 AM.

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"