English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Example.
monday, 2 2007. I want to extract everything up to the comma.
or
trn|txd|34234|2007|adx|afod8ad
I want to extract everything up to adx.

the number of characters varies of what I want to select, so the comon left statement doesn't work.

2007-06-19 08:21:30 · 3 answers · asked by johnkylex 1 in Computers & Internet Programming & Design

3 answers

For the date this seems to work
=LEFT(A2,(FIND(",",A2)-1))
and for the other string
=LEFT(A2,(FIND("adx",A2)-1))

2007-06-19 08:35:21 · answer #1 · answered by AnalProgrammer 7 · 0 0

Basically, you will need to find the character where you want to start, count the numbers of characters leading to it, and then use that as the starting point to extract the text to the right of it.

2007-06-19 08:36:00 · answer #2 · answered by luckyaz128 6 · 0 0

I'd use something like =left(A1,find("string to find",A1))

That finds the "string to find" in cell A1, returns the starting position of the string, then uses left to pull everything from the left most character to the found position as the result of the equation. You'll probably have to play around with adding or subtracting 1 from the find string (find("string to find",A1)+1 or find("string to find",A1)-1)

2007-06-19 08:36:42 · answer #3 · answered by CmptrGuy 1 · 0 0

fedest.com, questions and answers