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?

excel image

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;

  1. getting people make mark next number "interesting"
  2. 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

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -