mufasa
03-19-2008, 05:10 AM
I have motoring spreadsheet. The worksheets is the manufacturers name and each work sheet has data in it.
For Worsksheet Toyota we have the following Headings with Data below it:
Model............Year.............Mileage........Dealer Name.............Price
Corolla...........2006............5500............GK Toyota...............$5000
Corolla...........2003............17000...........Freedom Cars..........$1900
..........................................................................T otal:...$2000000
Auris..............2007...........1900............Freedom Cars...........$10000
Auris..............2008...........500.............LC Auto...................$14000
..........................................................................T otal:...$3000000
For Worsksheet Volkswagen
Model............Year........Dealer Name............Price
Golf..............2005........Tiger VW................$4000
Golf..............1998........Freedom Cars..........$900
..................................................Total:...$1110000
Jetta..............2004.......F1 Auto.................$10000
Jetta..............2008.......Eagle Motors..........$14000
..................................................Total:...$3000000
You will notice there is a difference in the Columns for Toyota and Volkswagen.
Ideally what my client want is a spreadsheet:
Dealer Name.......Model............Total Price
Freedom Cars.....Corolla...........$25640
Freedom Cars.....Golf...............$32610
Eagle Motors......Corolla...........$15871
I'm coming from a C# .net background and what looks easy for you might be a hill to climb for me.
I am going to put my ideas to you and pls assist me with guiding me in the right directions with VBA code.
1) What I would Ideally do is to start with a pointer in A1 then navigate down until I find the string "Model" ... when we reach A50 we know "Model" is not in this column. I them move to B1 and navigate down. This process will be repeated until I find the string "Model". I can then search row by row for the Dealer Name and Price. I then search for Total (Similar to Model) and then I will have my range for a specific model which I then copy to a temp Worksheet. Would you say this is a good Idea? If not what would you recommend.
2)Say for example my idea is brilliant I have copied all the info to the Temp Worksheet. Now I Have 3 columns but not grouped with Total Price ... how do I do this using VBA Code.
Thx for your time ...
For Worsksheet Toyota we have the following Headings with Data below it:
Model............Year.............Mileage........Dealer Name.............Price
Corolla...........2006............5500............GK Toyota...............$5000
Corolla...........2003............17000...........Freedom Cars..........$1900
..........................................................................T otal:...$2000000
Auris..............2007...........1900............Freedom Cars...........$10000
Auris..............2008...........500.............LC Auto...................$14000
..........................................................................T otal:...$3000000
For Worsksheet Volkswagen
Model............Year........Dealer Name............Price
Golf..............2005........Tiger VW................$4000
Golf..............1998........Freedom Cars..........$900
..................................................Total:...$1110000
Jetta..............2004.......F1 Auto.................$10000
Jetta..............2008.......Eagle Motors..........$14000
..................................................Total:...$3000000
You will notice there is a difference in the Columns for Toyota and Volkswagen.
Ideally what my client want is a spreadsheet:
Dealer Name.......Model............Total Price
Freedom Cars.....Corolla...........$25640
Freedom Cars.....Golf...............$32610
Eagle Motors......Corolla...........$15871
I'm coming from a C# .net background and what looks easy for you might be a hill to climb for me.
I am going to put my ideas to you and pls assist me with guiding me in the right directions with VBA code.
1) What I would Ideally do is to start with a pointer in A1 then navigate down until I find the string "Model" ... when we reach A50 we know "Model" is not in this column. I them move to B1 and navigate down. This process will be repeated until I find the string "Model". I can then search row by row for the Dealer Name and Price. I then search for Total (Similar to Model) and then I will have my range for a specific model which I then copy to a temp Worksheet. Would you say this is a good Idea? If not what would you recommend.
2)Say for example my idea is brilliant I have copied all the info to the Temp Worksheet. Now I Have 3 columns but not grouped with Total Price ... how do I do this using VBA Code.
Thx for your time ...