[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How do I find and extract text from an Excel cell ?

Posted on 2011-09-05
5
Medium Priority
?
269 Views
Last Modified: 2012-06-27
Hi,

I want to split out the cell contents into 4 columns.
For example, a typical cell in the column has the following data :

09/06/2011
98333.0
£378
1/7/11 - 30/9/11

I want to be able to split these four items into four separate columns using Excel formulas.

Any ideas ?
Toco
0
Comment
Question by:Tocogroup
[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
  • 2
5 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 36484166
Does it need to be formulas? You could just use Text to Columns for that.
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 36484231
Is this actually one cell or four cells in the same column? I assume not otherwise you could use the transpose function in the Paste Special window.

Is the first date always in 10 character format dd/mm/yyyy?
Does the value always have the £ sign?
How are the lines separated in the cell, is it a carriage return?

If so:
Column 1 =LEFT(A1,10)
Column 2 =MID(A1,11,FIND("£",A1,1)-1)
Column 3 =MID(A1,FIND("£",A1,1),4)
Column 4 =RIGHT(A1,LEN(A1)-LEN(B1)-LEN(C1)-LEN(D1)-3)

There are a couple of fixed values, the 4 in Column 3 and the -3 in column 4. I guess the value in column 3 will be variable so will need to find a way to identify the length. The - 3 is to overcome the 3 carriage returns ignored in previous calculations.

Thanks
Rob H
0
 

Author Comment

by:Tocogroup
ID: 36484362
Hi Rorya,

The problem is that the data (eg.dates using yy instead of yyyy, and vice versa) is not consistent so I can't use fixed width columns. Neither can I use Delimited because there aren't spaces, commas or tabs between some of the fields.
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 total points
ID: 36484374
But if that's all in one cell, you probably have linefeeds there, so in the delimited options, choose Other and then click in the textbox, hold the Alt key down and type 0010 on the number keypad and then Finish
0
 

Author Closing Comment

by:Tocogroup
ID: 36484868
Ah excellent ! I've got two solutions in one.
The Delimited solution is a simple but very good one.
Many thanks
Toco
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

650 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