Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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,040 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: 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 will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

705 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