Hello. I was wondering if there was a way to sum up all the cells in a row that are the same color. The cell's colors are based on conditional formatting.
Hello. I was wondering if there was a way to sum up all the cells in a row that are the same color. The cell's colors are based on conditional formatting.
You would need to use the formula which creates the CF as the basis of the sum formula (probably using SUMPRODUCT). What is the condition that you use for the CF?
Pete
Hi Skip and welcome to the forum
1 thing you need to keep in mind regarding colors - they are just a cosmetic appled to a cell, they have no value, and have nothing to do with cell contents. As such, you cannot (directly) use any regular formula or function based ontheir color.
If the color was applied through Conditional Formatting, then you can probably use the basis for the CF to create a sum()
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
I used 2 conditions.
1st. =$A$2=1
2nd. =$A$2=2
If $A$2=1 the entire column is highlighted blue.
If $A$2=2 the entire column is highlighted yellow.
I want to find the sum of all the blue cells in each row.
I want to do the same with the yellow cells.
without seeing a sample workbook, i can only offer a guess. try something like...
=sumif(range-with-1,1,range-to-sum)
If that doesnt work, i would suggest you upload a sample work book, (all sensitive data removed), showing what data you are working with, a few examples of what your expected outcome is, and how you arrived at that
To attach a file to your post,
click advanced (next to quick post),
scroll down until you see "manage file",
click that and select "add files" (top right corner).
click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"
Once the upload is completed the file name will appear below the input boxes in this window.
You can then close the window to return to the new post screen.
Skip example.xlsx
Here is an example of what I'm working with.
something like??
=IF(A1=2,SUM(A2:A10)+IF(C1=2,SUM(C2:C10)))
Last edited by vlady; 01-14-2013 at 11:11 PM.
I think people forget the word "THANK YOU!!!!" Do you still know it???
There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "
Regards,
Vladimir
I want to find the totals for each row.
Try...
F2 copied to the right and down >> =SUMIF($A$1:$D$1,COLUMN(A1),$A2:$D2)
HTH
Regards, Jeff
Jeff,
That formula works perfect, thanks!
You are very welcome and thanks for the feedback.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks