Macro/VBA Help with Attempting to Consolidate Multiple Worksheets into One.... with a Twist

doublejtacoma

New Member
Joined
Oct 27, 2013
Messages
4
Hello there,

I seek your help. I have scoured this forum, along with a few others, as well as some YouTube videos, and I can't seem to find out exactly what I am looking for.

I am looking to some data consolidation; please allow me to elaborate on what I am trying to achieve. What I have is a daily worksheet template that I use at work each day. So I end up with 365 worksheets per year, and that's fine for my record keeping, but what I am interested in doing is consolidating a month's worth of daily sheets into one Monthly worksheet. To simplify this consolidation, I am only interested in copying data from a few cells from each daily sheet. Here is a sample of the Daily Template:

Excel 2002
ABCDEFGHI
1COMPANY XYZ
2DAILY SALES REPORT DATE:
3DESCRIPTIONACCOUNTDEBITCREDIT
4
5BANK DEPOSIT11300.00
6
7
8POS CREDIT12100.00
9
10POS DEBIT12050.00
11
12LOTTERY PAID OUT41760.00
13
14CONFECTIONARY PAID OUTS41660.00
15
16
17
18MAINTENANCE PAID OUT58200.00
19
20
21
22VEHICLE EXP PAID OUT5580
23GST on Paid Outs12700.00Daily Agency Settlment
24DebitCredit
25Bank 1130
26ESSO EXTRA REDEM54450.00Interac 12050.00
27Credit 12100.00
28CHARGESFuel 40220.00
29Gift Card
30C/c Dsc 53150.00
31
32US$ DEPOSIT10800.00
33
34
35US EXCHANGE53000.00
36
37DRIVEAWAYS5510
38
39CREDITS
40AGENCY FUEL SALES4022
41CONFECTIONARY SALES4160
42LOTTERY SALES4170
43LOTTERY REFUNDS4176
44GIFT CARDS (prepaid card purchases)4165
45GST COLLECTED2070
46
47TOTALS0.000.00
48
49CASH OVER/SHORT53800.00

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Daily Template



The objects highlighted in green are the cells I am interested in consolidating data from. The first one at the top is where I would type in the current date, but I think date information may be obtainable from the file name.

I am trying to achieve a consolidated worksheet that would look something like this:

Excel 2002
ABCD
1October, 2013
2DateAGENCY FUEL SALESCONFECTIONARY SALESLOTTERY SALES
3October 01
4October 02
5October 03
6October 04
7October 05
8October 06
9October 07
10October 08
11October 09
12October 10
13October 11
14October 12
15October 13
16October 14
17October 15
18October 16
19October 17
20October 18
21October 19
22October 20
23October 21
24October 22
25October 23
26October 24
27October 25
28October 26
29October 27
30October 28
31October 29
32October 30
33October 31

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Target Data Sheet



One thing to note is that some sort of a paste-->tranpose function to get the items from being listed vertically to being listed horizontally (or vice versa (I'm dyslexic)) would be very nice, but not necessary if listing dates horizontally is easier. Doesn't matter to me, I am just looking to create some charts, and do some year to year comparisons. The latter will be more useful and convenient than the way I have been doing it now (opening multiple worksheets and comparing one by one).

I should also mention, that I use an organized folder structure and a simple naming convention. The files are named [mmm dd] and placed into [Month yyyy] Folders. For example October 2013 Folder would contain files Oct 1.xls,Oct 2.xls....Oct 31.xls

I was hoping to generate one consolidated month report by applying a macro to each month folder, and like I said earlier, the date could be grabbed from the file name itself.

Let me know if you think you guys can help,
I appreciate all of your time, and want thank you in advance,
Cheers!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
There is a free add-in called RDB Merge that I think will get you 90% there. It doesn't transpose the data but it can colsoidate it side-by-side where each day would be a column each with three rows with your categories. After it consolidates the data, you could have a simple macro to transpose the result.

RDB Merge

Use the Paste data next to each other option.
 
Last edited:
Upvote 0
Hey thanks so much AlphaFrog . It looks like that might work. I will try it tomorrow when I'm back at work. I can quickly transpose the date myself. Thanks again for the quick response. Great people make for a great forum!
 
Upvote 0
I have had a chance to try it and it works, but with one limitation. So my files are listed by mmm dd.xls (Oct 1.xls-Oct 31.xls for example). For whatever reason RBDmerge, arranges them in that stupid illogical order of Oct 1, Oct 10, Oct 11,...Oct 19, Oct 2, Oct 20...Oct 29, Oct 3,etc. I cant seem to sort it either. I am stuck here with no way to sort it into a proper ascending order, ie. from 1st to 31st. I am thinking some sort of dating excel add-on might work because it is picking up the date as just text I guess. I can't change the format of the date cells.
Excel 2002
ABCD
1September 1/1344072.258342.12444.00
2September 10/1323100.824799.06397.00
3September 11/1325974.754959.43473.00
4September 13/1324991.535403.42398.00
5September 13/1324693.685458.68845.00
6September 14/1329049.975864.68664.00
7September 15/1326501.715690.43353.00
8September 16/1324400.524477.71343.00
9September 17/1322471.084357.88331.00
10September 18/1322843.744819.611235.00
11September 19/1322493.404720.19542.00
12September 2/1344308.806859.29365.00
13September 20/1320905.225306.79788.00
14September 21/1325207.214814.881065.00
15September 22/1337647.965391.23789.00
16September 23/1325462.973881.87242.00
17September 24/1319934.324296.22267.00
18September 25/1322141.084603.88805.00
19September 26/1320978.074587.15569.00
20September 27/1326873.695323.50962.00
21September 28/1327151.085089.46922.00
22September 29/1333053.444863.99446.00
23September 3/1327605.964963.93568.00
24September 30/1323397.713729.02501.00
25September 4/1326375.755414.27623.00
26September 5/1326396.095218.01917.00
27September 6/1327099.545022.44877.00
28September 7/1326244.185846.26811.00
29September 8/1327703.995312.781479.00
30September 9/1325099.224651.00437.00

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Ignore the fact that it says September when I am referring to October. Any way to sort this out??
 
Upvote 0
  • Select column A
  • Ctrl+H to open the Replace dialog
    [*=1]Find what: /
    [*=1]Replace with: , 20
    [*=1]Replace All
  • This will convert the text to serial dates.
  • Select columns A:D and sort on column A
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

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