If, Then, Else Formulas

  • Thread starter Thread starter Annie D
  • Start date Start date
A

Annie D

I have a question for you regarding an If, Then, Else
function in Excel...

I have a worksheet that has three designations in column
A: RH, FX and FD

Each row has a total at the end of the list.

I want to have the function lookup each row, and do a sum
for the rows that only include an FX, then a sum for the
rows that only include an RH, and then a sum for the rows
that only include an FD. (So, three separate formulas
with three separate results).

For example:

A B C D E
1 ID FY02 FY03 FY04 TOTAL
2 FX 2 10 5 17
3 FD 5 8 2 15
4 RH 6 6 16 28
5 FD 3 4 5 12
6 FX 4 9 3 16
7 RH 12 8 4 24

If cell in Column A="FX", then include in SUM.
=E1+E6

If cell in Column A="FD", then include in SUM.
=E3+E5

If cell in Column A="RH", then include in SUM.
=E28+E7

Can you shed any light on how to do this? I have tried
LOOKUP, IF...THEN...ELSE, SEARCH and pretty much
everything else with no success.
 
Hi Annie D!

Try:
=SUMIF($A$2:$A$7,"RH",$E$2:$E$7)
=SUMIF($A$2:$A$7,"FX",$E$2:$E$7)
=SUMIF($A$2:$A$7,"FD",$E$2:$E$7)

Or place RH, FX and FD in a column G2:G4 and use

=SUMIF($A$2:$A$7,G2,$E$2:$E$7)
Copy down

Or try a Pivot table for which see:
Debra Dalgleish & Jon Peltier:
http://peltiertech.com/Excel/Pivots/pivotstart.htm
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top