excel - How can I find sum of highlighted cells? -
i've been asked excel question @ work, i'm not excel person, use it.
is possible sum()
of highlighted boxes?
i've looked online found plugins or vba scripts.
as vba script solution, have:
function sumclr(rcolor range, rrange range) dim rcell range dim lcol long dim vresult lcol = rcolor.interior.colorindex each rcell in rrange if rcell.interior.colorindex = lcol vresult = worksheetfunction.sum(rcell, vresult) end if next rcell sumclr = vresult end function
it works if there inbuilt function, that'd great.
if in excel 2007 or later sort column colour, , sum coloured boxes (which grouped @ top or bottom). else mean;
- getting people make mark next number "interesting"
- require vba - per post.
if colours have been created using conditional formatting (check selecting home tab, , conditional formatting while 1 of highlighted cells selected) can use same formula , sumproduct or similar calculate sum.
Comments
Post a Comment