What If, Count - totally confused......

  • Thread starter Thread starter LancsGirl
  • Start date Start date
L

LancsGirl

Hi,

Had a look at numerous posts and the help pages but still cant do this one!

I have a spreadsheet that I want to say
If column A equals 'X' then go to column H and tell me the sum of the
amounts in that column for all the rows where A is equal to the 'X'.

Any help greatly appreciated........ :-)
Ta.
Lesley
 
Hi,

This

=SUMIF(A1:A30,"x",H1:H30)

or this

=SUMPRODUCT((A1:A30="x")*(H1:H30))

Mike
 
Hi Mike,
Thanks for that - worked a treat :-)

Can I add another if in there too? The list contains unique identifiers for
practices and then the staff are held against each one so I want to say if
practice is 'Y'(column A) and sex is 'M' (Column H) then calculate result of
what is in Column J.
I've inherited this spreadsheet!
Thanks
 
Hi,

Sumproduct lends itself better to additional conditions

=SUMPRODUCT((A1:A30="x")*(B1:B30="p")*(H1:H30))

Mike
 

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

Back
Top