Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pull string before a certain character | Excel Discussion (Misc queries) | |||
Counting No of character in a string | Excel Worksheet Functions | |||
Finding a Character in a String Using VBA | Excel Discussion (Misc queries) | |||
Finding a character in a text string (take3) | Excel Discussion (Misc queries) | |||
Excel-Match 1st text character in a string to a known character? | Excel Worksheet Functions |