A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Need to reorganize - transpose columns to rows per article number



 
 
Thread Tools Display Modes
  #1  
Old August 16th 12, 09:16 PM
toblju toblju is offline
Junior Member
 
First recorded activity by ExcelBanter: Aug 2012
Posts: 1
Default Need to reorganize - transpose columns to rows per article number

I have a list with five columns. Every row contains following data:
Column A contains article number. Column B-E contains info about where to find pictures.

It looks like this:
Article Info 1 Info 2 Info 3 Info 4
500086 black blue white yellow
500087 black red blue green

I would like to extract data in a different format.
I would like it to look like this:

Article Number Info
500086 1 black
500086 2 blue
500086 3 white
500086 4 yellow
500087 1 black
500087 2 red
500087 3 blue
500087 4 green

I suppose I need a macro? My list is about 1200 articles.
Note that the second column should go from 1 to 4 all over.

Thanks
Tobias
Ads
  #2  
Old August 19th 12, 10:33 PM posted to microsoft.public.excel.misc
zvkmpw
external usenet poster
 
Posts: 114
Default Need to reorganize - transpose columns to rows per article number

On Thursday, August 16, 2012 1:16:18 PM UTC-7, toblju wrote:
> I have a list with five columns. Every row contains following data:
>
> Article Info 1 Info 2 Info 3 Info 4
> 500086 black blue white yellow
> 500087 black red blue green
>
> I would like it to look like this:
>
> Article Number Info
> 500086 1 black
> 500086 2 blue
> 500086 3 white
> 500086 4 yellow
> 500087 1 black
> 500087 2 red
> 500087 3 blue
> 500087 4 green


With the source date in Sheet1, put the following in Sheet2.

In A2
=INDEX(Sheet1!A:A,INT((ROW()+2)/4)+1)

In B2
=MOD(ROW()-2,4)+1

In C2
=INDEX(Sheet1!$B:$E,INT((ROW()+2)/4)+1,MOD(ROW()-2,4)+1)

Copy A2:C2 down as far as needed.

Put the column headers in row 1.

Hope this helps getting started.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transpose columns to rows using first columns repeated. hn7155 Excel Worksheet Functions 7 February 12th 09 11:50 PM
Transpose a .csv from columns to rows Chris Excel Programming 5 May 6th 06 08:53 PM
transpose 7 rows/7 columns Annette Excel Programming 4 January 29th 06 12:17 PM
how do I transpose columns and rows jnix Excel Discussion (Misc queries) 10 December 22nd 04 01:44 PM
transpose 255+ columns into rows? scottwilsonx[_64_] Excel Programming 0 October 25th 04 06:31 PM


All times are GMT +1. The time now is 07:00 PM.


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