Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need a Excel formula to remove numbers at end of lines of text that are of varying lengths & # of digits

Posted on 2014-07-25
2
Medium Priority
?
4,329 Views
Last Modified: 2014-07-25
I was able to figure out the TRIM formula to extract the numbers at the end of each line of the SAMPLE TEXT (below) into column C:
=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",LEN(A2))),LEN(A2)))

Next I would like to extract just the text strings, without the numbers (or space in front of the numbers), into column B from the SAMPLE TEXT below. I've taken a few stabs at it but have only managed to extract the first word in each line and not the entire text string.

SAMPLE TEXT:
Documents (in Book) Total 239
Frame generatable file(Skipped, Unprocessed) 0
Unable to generate due to Errors 0
Generated OK 239
Generated containing Warnings or Errors 0
Text Amendments (Insertions/Deletions) Total 40
Activated 40
Warnings or Errors 0
DataLinks (Links to Database) Total 3730
New 23
Changed 45
Warnings or Errors 0

Thanks,
Andrea
0
Comment
Question by:Andreamary
2 Comments
 
LVL 19

Accepted Solution

by:
helpfinder earned 2000 total points
ID: 40219324
use this formula (I assume your data ar in A column)
note that based on your regional settings you may need to replace semicolon (;) sign in formula by comma (,)
=LEFT(A1;LEN(A1)-LEN(MID(A1;FIND(CHAR(22);SUBSTITUTE(A1;" ";CHAR(22);LEN(A1)-LEN(SUBSTITUTE(A1;" ";""))))+1;255))-1)

see also attached sample
sample.xlsx
0
 

Author Closing Comment

by:Andreamary
ID: 40219345
Thanks for your quick response, helpfinder! I converted the semi-colons to commas and the formula worked perfectly.

Cheers,
Andrea
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question