PDA

View Full Version : Can anyone help with an IF formula



wildpianist
01-20-2011, 07:51 AM
I'm really sorry, I've hit a blank, and basically I need a quick formula to count the number of post and phone items in column B that happen to be over 18 from Column A to be displayed as x and y respectively.

Sorry for the vulgarity of the spreadsheet example, I am unable to upload files from this network :(


A B C D
1 17 phone
2 18 post
3 19 phone
4 20 post
5 21 post
6
7
8 Total number of Post over 18 = x
9 Total number of Phone over 18 = y

Any ideas?

shrivallabha
01-20-2011, 08:32 AM
Hello wildpianist (quite a name...!)

In Cell C9 put


=SUMPRODUCT((C2:C8="post")*(B2:B8>18))

In Cell C10 put


=SUMPRODUCT((C2:C8="phone")*(B2:B8>18))


And I just learnt them courtesy XLD's sumproduct forum. Please see on this forum:
http://www.vbaexpress.com/forum/showthread.php?t=26304
Excellent material for anyone.