Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Steve
 
Posts: n/a
Default Need help with Converting Rows of data into 2 columns

I have a spreadsheet that has several rows of data varying in length.
Everything under the first column is a part number then everything to
the right of the part number in each row is a product code. I need
something that will convert this:

PN PROD PROD PROD PROD PROD PROD PROD

12345 rq545 gr433 or444 tz222 hq444 pl111
67892 ca544 ca899 cb355 ay111
98765 dd777 hw345 pp943 qa612 tw555 uj764 vf544
58992 gh678 lo122 uo512 mm677 xx411

INTO:

PN PROD
12345 rq545
12345 gr433
12345 or444
12345 tz222
12345 hq444
12345 pl111
67892 ca544
67892 ca899
67892 cb355
67892 ay111
98765 dd777
98765 hw345
98765 pp943
98765 qa612
98765 tw555
98765 uj764
98765 vf544
58992 gh678
58992 lo122
58992 uo512
58992 mm677
58992 xx411


except on a much larger scale of data....

any help would be appreciated.....Thanks, Steve

  #2   Report Post  
Max
 
Posts: n/a
Default

One play ..

Assume this source table is in Sheet1, cols A to H, data from row2 down

PN PROD PROD PROD PROD PROD PROD PROD
12345 rq545 gr433 or444 tz222 hq444 pl111
67892 ca544 ca899 cb355 ay111
98765 dd777 hw345 pp943 qa612 tw555 uj764 vf544
58992 gh678 lo122 uo512 mm677 xx411


In Sheet2
---
Put in A2:
=OFFSET(Sheet1!$A$2,INT((ROWS(Sheet1!$A$1:A1)-1)/7),)

Put in B2:
=OFFSET(Sheet1!$B$2,INT((ROWS(Sheet1!$A$1:A1)-1)/7),MOD(ROWS(Sheet1!$A$1:A1)
-1,7))

Note: Change the number "7" within both OFFSET formulas in A2 & B2 above to
be equal to the maximum number of Product code cols that you have in Sheet1.
I used "7" because the sample data had a max of 7 product code cols

Select A2:B2, fill down until zeros appear in *both* cols A & B, signalling
exhaustion of data "extraction" from Sheet1

Kill the formulas in cols A & B with an in-place:
Copy paste special values ok

Put labels into A1:B1, do a Data Filter Autofilter
In the autofilter droplist in B1, select: 0
Then select all the filtered rows (all blue row headers),
Right-click Delete Row

Remove the autofilter, and the desired results
will be left in cols A & B ..
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Steve" wrote in message
ups.com...
I have a spreadsheet that has several rows of data varying in length.
Everything under the first column is a part number then everything to
the right of the part number in each row is a product code. I need
something that will convert this:

PN PROD PROD PROD PROD PROD PROD PROD
12345 rq545 gr433 or444 tz222 hq444 pl111
67892 ca544 ca899 cb355 ay111
98765 dd777 hw345 pp943 qa612 tw555 uj764 vf544
58992 gh678 lo122 uo512 mm677 xx411

INTO:

PN PROD
12345 rq545
12345 gr433
12345 or444
12345 tz222
12345 hq444
12345 pl111
67892 ca544
67892 ca899
67892 cb355
67892 ay111
98765 dd777
98765 hw345
98765 pp943
98765 qa612
98765 tw555
98765 uj764
98765 vf544
58992 gh678
58992 lo122
58992 uo512
58992 mm677
58992 xx411


except on a much larger scale of data....

any help would be appreciated.....Thanks, Steve



  #3   Report Post  
Steve
 
Posts: n/a
Default

worked like a charm, thanks a lot, Steve....

  #4   Report Post  
Max
 
Posts: n/a
Default

Glad to hear that, Steve !
You're welcome ..
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Steve" wrote in message
oups.com...
worked like a charm, thanks a lot, Steve....



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
sort 2 or more rows of cells linked to one row of data Magdalena Excel Worksheet Functions 1 July 16th 05 09:43 PM
Pivot Table for survey data w/ questions as Rows & poss answrs as pfwebadmin Excel Discussion (Misc queries) 0 May 17th 05 02:31 PM
Insert rows Mr. G. Excel Worksheet Functions 3 March 31st 05 03:49 AM
Control pasted/imported data to use only ODD or EVEN rows john C Excel Discussion (Misc queries) 1 March 2nd 05 08:37 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


All times are GMT +1. The time now is 06:34 AM.

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

About Us

"It's about Microsoft Excel"