# excel if conditions

Microsoft Office excel 2007 plain & simp...
November 10, 2010 at 15:59:19
Specs: Windows XP
 Hi everyone,I'm not sure if this is possible but I will do my best to explain what I'm looking for.I have different categories in column A, and a corresponding \$ amount a few columns over in column D. I'm trying to create a formula, most likely an IF statement, that if the value in column A is true, than the result would be the sum of every \$ amount that are 3 cells over in the same row (matched up with A). Here's an example:Column A Column B Column C Column DSally --------------------------- \$5John --------------------------- \$10Joe ---------------------------- \$33Sally --------------------------- \$21John --------------------------- \$16John --------------------------- \$3If gotten as far as =IF(A1="Sally", ..................... but that's it :) I'm looking for an equation that will find every dollar amount in Column D that links up to Sally's name in Column A. So a running total.Thanks for the help!

See More: excel if conditions

#1
November 10, 2010 at 16:29:52
 Your correct, what you need is an IF function, but the IF function you need is a =SUMIF() function.Something like this:=SUMIF(A1:A6,"Sally",D1:D6)If you had a list of just names in column E like:A B C D E F Sally \$5 Sally John \$10 John Joe - \$33 Joe Sally \$21 John \$16 John \$3 Then in cell F1 you could use:=SUMIF(\$A\$1:\$A\$6,E1,\$D\$1:\$D\$6)drag the formula down and you have all your totals.MIKEhttp://www.skeptic.com/

Report •

#2
November 10, 2010 at 17:03:54
 You rock, thanks for the help that works perfectly. I love learning new tricks in excel =)

Report •

#3
November 10, 2010 at 17:12:31