Convert data layout macro

jwst87

New Member
Joined
May 26, 2010
Messages
6
Hi all,

I have a large amount of data showing time taken by employees performing specific tasks that is currently in the fallowing layout:

NAME Task1 Task2 Task3 Task4 Task5
James 25 5 0 20 45
Andrew 90 25 0 10 20
Sarah 120 30 0 5 70

I would like to convert it into the following layout to make it easier to reference and create pivot tables from:

NAME TASK Time
James Task1 25
James Task4 20
Sarah Task3 0

So far doing this manually has proven to be very time consuming, I was wondering if it was possible to create a macro to do the work for me?

Cheers

Jon
 
@ Lenze,

I think he just copy/pasted our code without updating range refs for where his data resides. ;)
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
All sorted, I had updated the ranges however I had saved the macro in my PERSONAL.xls as opposed to the the actual worksheet I was working from, so my hidden sheet was getting updated over and over again. :oops:

The one with the range selection seems to be just the thing i'm looking for, thanks both for helping me with this.

Jon
 
Upvote 0
This code is fantastic.....how would I do the reverse. I want to convert the the output you showed into the original data format.
 
Upvote 0

Forum statistics

Threads
1,217,414
Messages
6,136,480
Members
450,016
Latest member
murarj

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top