![]() |
=IF(Range=Range, Range)
I am trying to use Excel to check if column B = column A then = c. Which works fine for one row, but I would like to sum the results. x x 1 y 1 y 6 x x 2 y 1 y 5 x x 3 y 6 y 4 x x 4 y 3 x 3 x x 5 y 9 x 2 x x 6 y 1 y 1 x x 7 y 8 y 0 x x 8 y 2 x 9 x x 9 y 1 x 8 = ?? = ?? = ?? Thanks, Rob -- hooper222 ------------------------------------------------------------------------ hooper222's Profile: http://www.excelforum.com/member.php...o&userid=30108 View this thread: http://www.excelforum.com/showthread...hreadid=497943 |
=IF(Range=Range, Range)
Sounds like you can use SUMPRODUCT() with unary operators, but I can't
tell from your example which rows are A, B, and C. Can you repost your example, showing the correct results and why a number is added to the total? |
=IF(Range=Range, Range)
I'll try to make my example more clear. Col A | Col B | Col C CAR | CAR | $100 DOG | CAT | $50 MAN | MAN | $25 _________________________ SUM COL C IF (A1..3 = B1..3) (ANSWER SHOULD BE $125){sum of row c} IT WORKS IF I USE =IF(A1=B1,C1)+IF(A2=B2,C2)+IF(A3=B3,C3) ,BUT I THINK THERE HAS TO BE A BETTER WAY WHEN YOU HAVE 100+ ROWS. THANKS ROB -- hooper222 ------------------------------------------------------------------------ hooper222's Profile: http://www.excelforum.com/member.php...o&userid=30108 View this thread: http://www.excelforum.com/showthread...hreadid=497943 |
=IF(Range=Range, Range)
Try this:
=SUMPRODUCT((A1:A100=B1:B100)*C1:C100) -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ============================================== "hooper222" wrote in message ... I'll try to make my example more clear. Col A | Col B | Col C CAR | CAR | $100 DOG | CAT | $50 MAN | MAN | $25 _________________________ SUM COL C IF (A1..3 = B1..3) (ANSWER SHOULD BE $125){sum of row c} IT WORKS IF I USE =IF(A1=B1,C1)+IF(A2=B2,C2)+IF(A3=B3,C3) ,BUT I THINK THERE HAS TO BE A BETTER WAY WHEN YOU HAVE 100+ ROWS. THANKS ROB -- hooper222 ------------------------------------------------------------------------ hooper222's Profile: http://www.excelforum.com/member.php...o&userid=30108 View this thread: http://www.excelforum.com/showthread...hreadid=497943 |
All times are GMT +1. The time now is 01:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com