Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 181
Default Text Extraction (parsing)

I have a column heading that contains year-month, department, and company
name (See Below)

2009-10 1151-Parts Dept - Casey Holdings

The first 7 characters represent the data, then there is a space, the next 4
characters represents the department (always 4 digits), the next characters
between the hyphen is the company group and the remaining text after the last
hyphen represents the company name.

I need a formula to extract the department department and one to extract all
the date, department, company group and company name (this is for future use)

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Text Extraction (parsing)

'Date
=LEFT(A1,7)

'Department
=MID(A1,9,4)

'group
=TRIM(MID(SUBSTITUTE(MID(A1,FIND(" ",A1)+1,255),"-",REPT(" ",255),2),6,255))

'name
=TRIM(RIGHT(SUBSTITUTE(MID(A1,FIND(" ",A1)+1,255),"-",REPT(" ",255),2),255))

If this post helps click Yes
---------------
Jacob Skaria


"Curtis" wrote:

I have a column heading that contains year-month, department, and company
name (See Below)

2009-10 1151-Parts Dept - Casey Holdings

The first 7 characters represent the data, then there is a space, the next 4
characters represents the department (always 4 digits), the next characters
between the hyphen is the company group and the remaining text after the last
hyphen represents the company name.

I need a formula to extract the department department and one to extract all
the date, department, company group and company name (this is for future use)

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Text Extraction (parsing)

You can use the below formula to get the date; which will return a date in
excel date format...
=DATE(LEFT(A1,4),MID(A1,6,2),1)

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

'Date
=LEFT(A1,7)

'Department
=MID(A1,9,4)

'group
=TRIM(MID(SUBSTITUTE(MID(A1,FIND(" ",A1)+1,255),"-",REPT(" ",255),2),6,255))

'name
=TRIM(RIGHT(SUBSTITUTE(MID(A1,FIND(" ",A1)+1,255),"-",REPT(" ",255),2),255))

If this post helps click Yes
---------------
Jacob Skaria


"Curtis" wrote:

I have a column heading that contains year-month, department, and company
name (See Below)

2009-10 1151-Parts Dept - Casey Holdings

The first 7 characters represent the data, then there is a space, the next 4
characters represents the department (always 4 digits), the next characters
between the hyphen is the company group and the remaining text after the last
hyphen represents the company name.

I need a formula to extract the department department and one to extract all
the date, department, company group and company name (this is for future use)

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 181
Default Text Extraction (parsing)

THX

"Curtis" wrote:

I have a column heading that contains year-month, department, and company
name (See Below)

2009-10 1151-Parts Dept - Casey Holdings

The first 7 characters represent the data, then there is a space, the next 4
characters represents the department (always 4 digits), the next characters
between the hyphen is the company group and the remaining text after the last
hyphen represents the company name.

I need a formula to extract the department department and one to extract all
the date, department, company group and company name (this is for future use)

Thanks

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
Complex text extraction formula RhysPieces Excel Worksheet Functions 4 December 31st 08 10:39 PM
Help with Text import and data extraction Jim G Excel Discussion (Misc queries) 19 December 21st 07 05:07 AM
Text string extraction Geoffric Excel Worksheet Functions 5 December 19th 07 07:18 PM
Parsing text Hamster07 Excel Discussion (Misc queries) 3 February 1st 07 07:32 PM
Complicated extraction of text lohwk Excel Discussion (Misc queries) 7 May 28th 06 09:36 PM


All times are GMT +1. The time now is 01:58 AM.

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"