trouble with formula

  • Thread starter www.SemperFratres.com
  • Start date
W

www.SemperFratres.com

I have a rather lengthy formula that I need to reduce in size and make it
read correctly.

I have some cells in column B that I need to add together if word in column
E is true. I have several different words that will be in column E and need
to create a formula for each one, and adding the rows in column B that = true
for column E. I hope you understand... if not, maybe you will understand
what I am trying to do with the formula below.

=IF(E5="PART",SUM(B5),"")+IF(E6="PART",SUM(B6),"")+IF(E7="PART",SUM(B7),"")+IF(E8="PART",SUM(B8),
")+IF(E9="PART",SUM(B9),"")+IF(E10="PART",SUM(B10),"")+IF(E11="PART",SUM(B11),"")+IF(E12="PART",S
M(B12),"")+IF(E13="PART",SUM(B13),"")+IF(E14="PART",SUM(B14),"")+IF(E15="PART",SUM(B15),"")+IF(E1
="PART",SUM(B16),"")+IF(E17="PART",SUM(B17),"")+IF(E18="PART",SUM(B18),"")+IF(E19="PART",SUM(B19)
"")+IF(E20="PART",SUM(B20),"")+IF(E21="PART",SUM(B21),"")+IF(E22="PART",SUM(B22),"")+IF(E23="PART
,SUM(B23),"")+IF(E24="PART",SUM(B24),"")+IF(E25="PART",SUM(B25),"")+IF(E26="PART",SUM(B26),"")+IF
E27="PART",SUM(B27),"")+IF(E28="PART",SUM(B28),"")+IF(E29="PART",SUM(B29),"")+IF(E30="PART",SUM(B
0),"")+IF(E31="PART",SUM(B31),"")+IF(E32="PART",SUM(B32),"")+IF(E33="PART",SUM(B33),"")+IF(E34="P
RT",SUM(B34),"")+IF(E35="PART",SUM(B35),"")+IF(E36="PART",SUM(B36),"")+IF(E37="PART",SUM(B37),"")
IF(E38="PART",SUM(B38),"")+IF(E39="PART",SUM(B39),"")+IF(E40="PART",SUM(B40),"")+IF(E41="PART",SU
(B41),"")+IF(E=54"PART",SUM(B54),"")+IF(E55="PART",SUM(B55),"")+IF(E56="PART",SUM(B56),"")+IF(E57
"PART",SUM(B57),"")+IF(E58="PART",SUM(B58),"")+IF(E59="PART",SUM(B59),"")+IF(E60="PART",SUM(B60),
")+IF(E61="PART",SUM(B61),"")+IF(E62="PART",SUM(B62),"")+IF(E63="PART",SUM(B63),"")+IF(E64="PART"
SUM(B64),"")+IF(E65="PART",SUM(B65),"")+IF(E66="PART",SUM(B66),"")+IF(E67="PART",SUM(B67),"")+IF(
68="PART",SUM(B68),"")+IF(E69="PART",SUM(B69),"")+IF(E70="PART",SUM(B70),"")+IF(E71="PART",SUM(B7
),"")+IF(E72="PART",SUM(B72),"")+IF(E73="PART",SUM(B73),"")+IF(E74="PART",SUM(B74),"")+IF(E75="PA
T",SUM(B75),"")+IF(E76="PART",SUM(B76),"")+IF(E77="PART",SUM(B77),"")+IF(E78="PART",SUM(B78),"")+
F(E79="PART",SUM(B79),"")+IF(E80="PART",SUM(B80),"")+IF(E81="PART",SUM(B81),"")+IF(E82="PART",SUM
B82),"")+IF(E83="PART",SUM(B83),"")+IF(E84="PART",SUM(B84),"")+IF(E85="PART",SUM(B85),"")+IF(E86=
PART",SUM(B86),"")+IF(E87="PART",SUM(B87),"")+IF(E88="PART",SUM(B88),"")+IF(E89="PART",SUM(B89),""
)+IF(E90="PART",SUM(B90),"")+IF(E91="PART",SUM(B91),"")
 
P

Pete_UK

What a long formula !!

You can replace it entirely with this:

=SUMIF(E5:E41,"PART",B5:B41) + SUMIF(E54:E91,"PART",B54:B91)

Hope this helps.

Pete
 
W

www.SemperFratres.com

Thank you Brad. I knew there was a way to use the :)) but I couldnt get it
working in there. I dont make many spreadsheets and have never had to make
one due this, but now that i see how it it is input in the "Arguments"
window, it makes more since to me.
Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top