Hi guys,
Im totally lost here. I need help converting an excel formula into a macro that will execute to sum specific cells depending on whether it is RED, YELLOW or GREEN.
Let me explain what I would like to happen: In column 1, the user will enter a number. In column 2 next to it, the user will either enter R for red, Y for yellow, or G for green.
I need a macro that will determine if the cell in column 2 is red, yellow or green, then take the number next to it, and sum it with all cells that are the same color. I was able to write a formula that will do this but I realized that I might be adding more or less records into this worksheet.
I'm thinking a loop of some sort, that will determine the first record and the last record, then look in column 2 for all cells that contain R and then sum. Then loop again for Y and then sum. Then loop agin for G then sum.
Thank you so much for your time!
I have attatched the file that will give you an example of what I am talking about.
Bookmarks