Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Extracting Cell Data Based on Input Mask

I have some messy data which has more text in each cell than I need.
For Example:

CompanyName 01-01-118-02W6
Comp Name 01-01-118-02W5
UselessPrefix 01-01-119-02W6
01-02-118-02W6 Useless Suffix
A01-01-119-02W6 Company
01-01-118-02W6duplicate

I want to extract only the "##-##-###-##W#" portion from each cell
(these are surface locations for anyone curious). I want to eliminate
prefixes and suffixes of any type, and report nothing if the cell
doesn't contain the appropriately inputted string.

There are about 30000 records.

Any suggestions?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Extracting Cell Data Based on Input Mask

John, this is an excellent Solution, very clever.

I was trapped in a SEARCH LEFT SUBSTITUTE nightmare. I forgot all
about FIND.

Thank you very much.

John Bundy (remove) wrote:
Try this out, paste in and copy down

=MID(A1,FIND("-",A1)-2,14)
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


" wrote:

I have some messy data which has more text in each cell than I need.
For Example:

CompanyName 01-01-118-02W6
Comp Name 01-01-118-02W5
UselessPrefix 01-01-119-02W6
01-02-118-02W6 Useless Suffix
A01-01-119-02W6 Company
01-01-118-02W6duplicate

I want to extract only the "##-##-###-##W#" portion from each cell
(these are surface locations for anyone curious). I want to eliminate
prefixes and suffixes of any type, and report nothing if the cell
doesn't contain the appropriately inputted string.

There are about 30000 records.

Any suggestions?



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 another worksheet based on user input Alvyn Excel Worksheet Functions 14 August 6th 08 05:41 PM
how to format data with an input mask like ss# (***-**-****) Dennis New Users to Excel 2 March 28th 08 10:31 PM
Cell input mask Dan N[_2_] Excel Programming 3 March 8th 06 08:03 PM
Can I set an input mask for a cell? Choro Excel Programming 1 February 19th 05 02:45 AM
Can I set an input mask for a cell? Choro Excel Programming 0 February 19th 05 02:23 AM


All times are GMT +1. The time now is 04:14 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"