To best explain my problem I will use this example
Dog 2 400
Cat 4 300
Car 1 200
Dog 7 800
Car 8 900
That data is in the top of my worksheet, and I would like to be able to find all the dog values then reference the 2nd and 3rd column and add all the dog values up and then post the totals in a area below like this
dog 9 1200
cat 4 300
car 9 1100
Stipulations
1) there are different amounts of values, there may be 1 dog value or 10 dog values, I would like the program to recognize the dog values and add the corresponding values.
2) dog, cat, car values are not the only values, there may be others like "tree, apple" but are not in use. So only values in the top of the spreadsheet get referenced to the bottom part.
3) New values can be added in other spreadsheets, so the program would recognize only the VALUES in use.
4) Since the amount of data can change from spreadsheet to spreadsheet, I have been using relative references, so the data in the second part of the sheet would be
offset(x,y)
from a specified cell.
This can be done manually could use pivot table, but I am trying to automate a spreadsheet, and am coding it in VBA, I've been working on this problem for a few days with no luck on this particluar problem.
If anybody can help me I would greatly appreciate it, If you can't help but at least can reference me to any documentation on this problem, I would also greatly appreciate that as well.
Bookmarks