validation - Data consolidation from different cells depending on variable in Excel -


i'm sure there simple answer, have literally looked hours, no avail. here's scenario...

if have 20 marbles: column a 20 rows long, each cell containing value 1. column b drop-down menu requiring user select red blue or yellow if select red 10 cells in column b, need cell e1 reflect value of "10" if select blue 6 cells in column b, need cell e2 reflect value of 6 if select yellow 4 cells in column b, need cell e3 reflect value of "4"

i need automatically populate cells in colum e (my consolidated data) total column a, depending on information selected in drop-down menu in column b. i'm assuming there code can enter in e1 total value of cells in column if value in cell right "red".

this needs able hold true if want change following scenario.... column 20 rows long, each cell containing different values. column b drop-down menu requiring user select "red" "blue" or "yellow"

a1 relfects "3"        a2 reflects "4" a3 reflects "2" b1 reflects "red" b2 reflects "red" b3 reflects "red" e1 needs reflect "9" 

i'm still learning lot, i'm not familiar. said, i'm sure isn't difficult, can't seem find it. though on right track "addif" code, couldn't figure variables. perhaps didn't know how "google" question. appreciated!

excel 2003 - 2010

use sumif:

=sumif(a2:t2,"red",a1:t1)  =sumif(search range, match value, sum range) 

if don't need value in row a, use countif:

=countif(a2:t2,"red") =countif(search range, match value) 

countif assumes 1 each, wouldn't hold true in second problem had, wanted make sure knew.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -