View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
[email protected] rhatala@stny.rr.com is offline
external usenet poster
 
Posts: 10
Default Select specific Data from a cell

The column's that have this problem are C
and the first cell that needs this code is C2 thru C1009

Do I change this line to reflect the cell address that I want the VBA
code to run against? S = Range("A1").Text



Thanks


On Wed, 30 Mar 2005 13:39:21 -0500, "Tom Ogilvy"
wrote:

I put this in a general module

Sub AAA()
Dim S As String
Dim F As String
Dim Pos As Integer
S = Range("A1").Text
Pos = InStr(1, S, "|")
F = Left(S, Pos - 1)
MsgBox F
End Sub

and your string in Cell A1 of the active sheet.

When I ran it, it put up a msgbox with

Ralph Stockhausen Jr

in it.