help needed to add values with conditions

B

Bishkan

Hi,

I have some data

N O P Q

TD (Y/N) Value VAT Total Val
Y £71.44 £10.72 £82.16 4
N £71.44 £10.72 £82.16 5
N £84.08 £12.61 £96.69 6
Y £84.08 £12.61 £96.69
N £102.85 £15.43 £118.28
N £34.22 £5.13 £39.35
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £84.08 £12.61 £96.69
N £84.08 £12.61 £96.69
Y £84.08 £12.61 £96.69
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00
N £0.00 £0.00 £0.00 44

0 £700.35 £105.05 £805.40 46

Recharges 48

What I need is a formula to add up the values in Q4:Q44 but only if the
corresponding value in the N column is Y. Every formula ive tried always
seems to come back with an error.

Thanks in advance.

Alex
 
D

David Biddulph

Well, you haven't told us which formulae you have tried and what errors they
came back with, so it's not easy for us to tell you what you did wrong.
Was one of the formulae =SUMIF(N2:N42,"Y",Q2:Q42) ?
If so, what error did it give?
 
M

Ms-Exl-Learner

Both the below mentioned formula’s will get you the result.

=SUMPRODUCT(($N$2:$N$44="Y")*($Q$2:$Q$44))
=SUMIF($N$2:$N$44,"Y",$Q$2:$Q$44)

Change the cell reference N2:N44 & Q2:Q44 to your desired range, if required.

Remember to Click Yes, if this post helps!
 

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