0

I need to copy the data from the excell sheet in which for each participant there are 3 raws one for the year 2004 one for year 2005 and one for 2006 in the coloumn tere are the months 01,02...12

I would like to have only one raw for each participants and I would like to have in the colomns the months for each year, such as 04_01 04_02 ... 04_12 05_01 05_02...05_12.

I tried with the pivot but the it doesnt work because of the way in which the data are organized. I read someting about programming in vba but I don't now what it is and I would not have idea where to start, do you have any suggestion?

thanks in advance.

(sorry but I can't post picture because I have less then 10 reputations :( )

mauro serra
  • 13
  • 1
  • 4
  • My friend, you should start by posting some data and expected results. As it is now, your question is quite hard to understand. After that, if you want to solve this using code, then you should start by looking for a good book or tutorial (StackOverflow is not a place to ask for that kind of guidance, but to get specific answers to specific questions). I suggest you read: [Help center: How to create a Minimal, Complete and Verifiable Example](http://stackoverflow.com/help/mcve) and ["What have you tried?"](http://whathaveyoutried.com) – Barranka Jan 15 '15 at 01:46
  • http://stackoverflow.com/q/17596226/62576 – Ken White Jan 15 '15 at 01:56
  • HI Barranka I would have liked to post some data but as I mentioned I couldn't because I have less then 10 reputations, anyway, Fumu7 answered me and I will try his solution, seems like it can work out. – mauro serra Jan 16 '15 at 01:28

1 Answers1

0

How about to use 'worksheet function'? It's simple, easy and not need to learn about VBA.

Following are the way what do you do.

I assume that your data is placed in cells A1:L:3, A column for Jan. ,B column for Feb. an so on, and row 1 for year 2004, row 2 for year 2005, and so on.

The output will be placed in row 5, cells A5:AJ5.

Steps to put functions are as follows.

  1. Input formula '=A1' into cell A5.

  2. Select cell A5 and copy (push both of control key and 'C' key).

  3. Select cells B5:L5 and paste (push both of control key and 'V' key).

    You may see the data of 2004 Jan. to 2004 Dec. in cells A5:L5 after step 3.

Let proceed to steps for year 2005 and 2006.

  1. Input formula '=B1' into cell M5.

  2. Select cell M5 and copy.

  3. Select cells N5:X5 and paste.

  4. Input formula '=C1' into cell Y5.

  5. Select cell Y5 and copy.

  6. Select cells Z5:AJ5 and paste.

After step 9, you may see the data of 2004 Jan. to 2006 Dec. in cells A5:AJ5.

== Explanation.

Function "=A1" in cell A5 means that show contents of A1 at cell A5. That is a reference to other cell. By using reference functions, you can arrange data as you like from other cells.

Community
  • 1
  • 1
Fumu 7
  • 1,091
  • 1
  • 7
  • 8