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
3,726 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 500 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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
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…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

632 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