Help with data manipulation

Samsonuk

New Member
Joined
Sep 20, 2013
Messages
4
Hi I have imported some raw data on sales and need to manipulate it so that i have 1 column for Date, 1 for sales and 1 for quantity.

So i'm trying to create a macro that inserts new rows, inserts 3 new columns "date,sales,qty", then transponses my values down.

I've made a demo spreadsheet showing what i need!

I'm new to VBA, managed to record a macro that did it for one product but i cant do it for more than one because my relative references screw up.

Here's a link to dropbox...https://dl.dropboxusercontent.com/u/43697423/Macro HELP.xlsx


If anyone can help me or guide me into what i need to do that would be great!

Sam
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi Sam

I've not looked at your sheet. Would you be able to post a sample of how the data currently looks here? There's some tools for doing so in my signature.


/AJ
 
Upvote 0

Excel 2012
ABCDEFGHIJKLMNOPQR
1Store NameProduct Item NbrProduct NameData TypeStore Type14/06/201421/06/201428/06/201405/07/201412/07/201419/07/201426/07/201402/08/201409/08/201416/08/201423/08/201430/08/201406/09/2014
2Store 15504368Product 1SalesVisiting Store£0.00£0.00£0.00£0.00£0.00£0.00£0.00£0.00£66.82£72.50£65.00£109.51£93.20
3Store 15504368Product 1QtyVisiting Store000000002629264740
4Store 15528489Product 5SalesVisiting Store£219.27£492.19£777.71£458.97£20.86£25.50£18.88£17.88£14.90£22.35£17.88£11.92£154.85
5Store 15528489Product 5QtyVisiting Store261593937549141814121015128181
Data




I think this is it....
 
Upvote 0
And this is the target format i'm looking for...


Excel 2012
ABCDEFG
1Store NameProduct Item NbrProduct NameStore TypeDateSalesQty
2Store 15504368Product 1Visiting Store14/06/2014£0.000
3Store 15504368Product 1Visiting Store21/06/2014£0.000
4Store 15504368Product 1Visiting Store28/06/2014£0.000
5Store 15504368Product 1Visiting Store05/07/2014£0.000
6Store 15504368Product 1Visiting Store12/07/2014£0.000
7Store 15504368Product 1Visiting Store19/07/2014£0.000
8Store 15504368Product 1Visiting Store26/07/2014£0.000
9Store 15504368Product 1Visiting Store02/08/2014£0.000
10Store 15504368Product 1Visiting Store09/08/2014£66.8226
11Store 15504368Product 1Visiting Store16/08/2014£72.5029
12Store 15504368Product 1Visiting Store23/08/2014£65.0026
13Store 15504368Product 1Visiting Store30/08/2014£109.5147
14Store 15504368Product 1Visiting Store06/09/2014£93.2040
15Store 15528489Product 5Visiting Store14/06/2014£219.27261
16Store 15528489Product 5Visiting Store21/06/2014£492.19593
17Store 15528489Product 5Visiting Store28/06/2014£777.71937
18Store 15528489Product 5Visiting Store05/07/2014£458.97549
19Store 15528489Product 5Visiting Store12/07/2014£20.8614
20Store 15528489Product 5Visiting Store19/07/2014£25.5018
21Store 15528489Product 5Visiting Store26/07/2014£18.8814
22Store 15528489Product 5Visiting Store02/08/2014£17.8812
23Store 15528489Product 5Visiting Store09/08/2014£14.9010
24Store 15528489Product 5Visiting Store16/08/2014£22.3515
25Store 15528489Product 5Visiting Store23/08/2014£17.8812
26Store 15528489Product 5Visiting Store30/08/2014£11.928
27Store 15528489Product 5Visiting Store06/09/2014£154.85181
Target Format
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

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