Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Extracting Data From The Right of a Cell

Hello All,

Thanks in advance for you help!!

I am trying to extract data from a single cell in Excel.

Example Data:

MX04-08-1-EA
MX04-1000-100-EA
MX04-10-10000-50-EA

The data I want to extract is the data "to the left" of the "second
dash from the right".

Example Data, With Results:

MX04-08-1-EA MX04-08
MX04-1000-100-EA MX04-1000
MX04-10-10000-50-EA MX04-10-1000
MX-04-999-G7-1-EA MX-04-999-G7

My starting data can have two or more dashes in it, but will always
have a minimum of two.

For reasons which I will not go in to, I am unable to write vbScript
functions in this spreadsheet. I need to use the MID, LEN, FIND, etc
to accomplish this.

ANY help is much apprecaited....
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Extracting Data From The Right of a Cell

The data I want to extract is the data "to the left" of
the "second dash from the right".


Give this formula a try...

=LEFT(A1,FIND("?",SUBSTITUTE(A1,"-","?",LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))-1))-1)

Rick Rothstein (MVP - Excel)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
extracting data from one cell to another pat67 Excel Worksheet Functions 8 April 30th 10 11:50 PM
I need help extracting some data from a cell hshayh0rn Excel Worksheet Functions 5 December 11th 06 07:32 PM
Extracting data from a cell April Stallings Excel Worksheet Functions 2 July 14th 06 03:50 PM
Extracting data from a cell April Stallings Excel Discussion (Misc queries) 6 July 14th 06 03:10 PM
Extracting data from a cell - please help ajw150 Excel Discussion (Misc queries) 2 May 30th 06 09:13 AM


All times are GMT +1. The time now is 06:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"