Solved

# Excel 2000 error parsing text in cell

Posted on 2013-01-31
259 Views
I have a spreadsheet with multiple total lines. I'm looking for a function to remove the word "total" from a cell. I have tried a function like this =LEFT(A1, FIND(" ", A1)-1) but if there is only one word, I get an error. If I try to use ISError, I just get true or false.
What am I missing? I'm using Excel 2000 which may make a difference in the formula.

12192
12192 Total
12514
12514 Total
900000
900000 Total
A1389099
A1389099 Total
0
Question by:minamina6

LVL 23

Accepted Solution

NBVC earned 500 total points
ID: 38840142
Try:

=TRIM(SUBSTITUTE(A1,"Total",""))

or

=LEFT(A1, FIND(" ", A1&" ")-1)  if you only want first word, where other word might not be Total.
0

LVL 50

Expert Comment

ID: 38840157
Using your original approach but with a slight amendment....

=LEFT(A1, FIND(" ", A1&" ")-1)

regards, barry
0

Author Closing Comment

ID: 38840170
NB_VC,
Thanks for giving me two options. I can use the second one elsewhere.
0

## Featured Post

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…