Hi,

Thanks for your response. I have spent a little while going over the code 
to figure out what is going on. I really like the filename parsing for 
determining what column to put data in. That will be very useful. I don't 
think I explained the consolidating objective well enough and I am hoping 
you could offer some insight on this as well. For this, there are multiple 
rows that fall under the same categories. So in the example there are 2 
rows of Yellow/A2/R. One has a value of 6 and the other has a value of 1. 
In the "Overall" spreadsheet, I'm trying to get a sum every time that 
happens. In this case the sum would be 7 for Yellow/A2/R. Would that change 
the size of the dictionary too much and make it incompatible with the 
"Overall" spreadsheet. In the example we would be going from 12 rows of 
data in the "Weekly" spreadsheet down to 8 in the "Overall" spreadsheet so 
it wouldn't be able to transfer from 1 cell in the "Weekly" to 1 cell in 
the "Overall". I have looked around a bit and it seems like I might be able 
to do something like this with the Dictionary? And if I can do that, would 
that significantly change your example files?

Best,
Sean

On Thursday, July 10, 2014 12:24:07 PM UTC-7, Paul Schreiner wrote:
>
> So, 
> you receive a file whose NAME includes that date.
> Then, in your file, you have data that corresponds to the data in the 
> received file
> and you wish to add the corresponding value from the Qty column to the 
> correct row of data?
>  
> it's actually pretty simple and straight-forward.
>  
> there's some Preparation issues.
> What I'd do is: 
> Use a  FileDialog box to select the input file.
> Then, parse the file name to determine the date.
> Look across the columns for the matching date to find the column.
> If it doesn't find it, add it to the end.
> Next, read in the entire list from the summary and load a 
> Dictionary object with the index being the concatenation of the 
> color-category1-category2 and use this to save the row number.
>  
> then, open the picked file and read the input data.
> use the concatenated color-category1-category2 to locate the row in the 
> summary and store the qty. 
>  
>  
> I threw together some sample files and a quick macro and functions.
>  
> I've hard coded a startup folder (since you didn't say where the files 
> would be stored)
>  
> C:\temp\VBA\Consolidate
>  
> if you put the sample file there, it should work.
>  
> You can double-click on cell A1 in the Summary sheet and it should begin
> (or run the macro called Load_DataFile)
>  
> I didn't put any comments in the code, so you'll have to use the Debugger 
> to try to follow the flow.
>  
> let me know if you have any questions.
>  
>  
> *Paul*
> -----------------------------------------
>
>
>
>
>
>
>
> *“Do all the good you can,By all the means you can,In all the ways you 
> can,In all the places you can,At all the times you can,To all the people 
> you can,As long as ever you can.” - John Wesley*
> -----------------------------------------
>
>    *From:* Sean M <smc...@gmail.com <javascript:>>
> *To:* excel-...@googlegroups.com <javascript:> 
> *Sent:* Thursday, July 10, 2014 1:23 PM
> *Subject:* $$Excel-Macros$$ Re: Consolidating Multiple Categories from 
> Separate New Workbooks Each Week
>  
> Hi,
>
> Sorry for the delayed response. I could still use help on this project. It 
> had been set aside since I wasn't able to get past this issue.
>
> On Monday, June 23, 2014 10:31:32 AM UTC-7, Sean M wrote:
>
> Hey Everyone,
>
> I'm having a hard time finding a solution to this issue and I'm hoping 
> someone 
> with more Excel/VBA knowledge than my novice self can offer some 
> suggestions. 
> Every week I receive a new Excel file that has information I would like to 
> consolidate to a separate "Overall" Excel file. For example, I will get a 
> new 
> spreadsheet every week (named XXXXX_"Year"-"Month"-"Day". xlsx) with data 
> as 
> follows:
>
> *Weekly File*
>
>      *Color* *x* *x* *Category 1* *x* *Category 2* *Quantity*  Yellow N/A 
> N/A A1 N/A L 2  Yellow N/A N/A A2 N/A R 6  Yellow N/A N/A A1 N/A R 4  
> Yellow N/A N/A A2 N/A R 1  Green N/A N/A B2 N/A L 3  Green N/A N/A B2 N/A 
> L 0  Green N/A N/A B1 N/A L 4  Green N/A N/A B1 N/A R 9  Blue N/A N/A C1 
> N/A L 8  Blue N/A N/A C2 N/A R 5  Blue N/A N/A C2 N/A R 1  Blue N/A N/A C1 
> N/A L 3  
>
>
>
>
>  
>
>
>
>
>
>  and I would like to create a macro that will update my "Overall" Excel 
> file with the new values each week in the following format:
>
>
>
>
>  
> *"Overall" File*
>
>
>
>
>
>
>     *Color* *Category 2* *Category 1* *6/20/2014* *6/27/2014* *7/4/2014*  
> Yellow L A1 2 
>
>  Yellow R A1 4 
>
>  Yellow R A2 7 
>
>  Green L B1 4 
>
>  Green L B2 3 
>
>  Green R B1 9 
>
>  Blue L C1 11 
>
>  Blue R C2 6 
>
>  
>
>
>
>
>  
>
>
>
>
>
>  The list of colors was too long to list here, so I made the example 
> smaller for simplicity. I'm guessing the format will be the same. Right now 
> I am consolidating and entering the quantity values by hand and would 
> really like to automate the process a bit with a macro button or anything 
> else I may not even know about yet. I have found that Pivot Tables do the 
> consolidating pretty well, but I am not sure how to update the "Overall" 
> file using values from a new spreadsheet each week without having to create 
> a new Pivot Table for each new file. 
>
>
>
>
>
>  
>
>
>
>
>
>  Any advice or suggestions will be greatly appreciated!
>
>
> Best,
> Sean
>
>
>
>
>
>  
>
>
>
>
>
>  
>
>
>
>
>
>  
>
>
>
>
>
>  
>
>
>
>
>
>  
>
> -- 
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
> https://www.facebook.com/discussexcel
>  
> FORUM RULES
>  
> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security 
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>  
> NOTE : Don't ever post confidential data in a workbook. Forum owners and 
> members are not responsible for any loss.
> --- 
> You received this message because you are subscribed to the Google Groups 
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to excel-macros...@googlegroups.com <javascript:>.
> To post to this group, send email to excel-...@googlegroups.com 
> <javascript:>.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>
>
>  

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to