Urgent Help - CountIf

J

Jeff

Hello,

In Sheet 1 Column B, I urgently need a formula to would execute the following:
Take Column A value = "Red" in sheet 1.

I need to look for value = "Red" in Sheet 2 column B and take the value in
Column C only if and only if Column A value= 2010

Sheet 2
2010 Red $10
2015 Red $15
2017 Red $16
 
M

Mike H

Jeff,

This goes on Sheet1 and looks for "Red" in A1

=INDEX(Sheet2!C1:C20,MATCH(1,(Sheet2!B1:B20=A1)*(Sheet2!A1:A20=2010),0))

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike
 
M

Mike H

I may have misunderstood, do you want this

=SUMPRODUCT((Sheet2!B1:B20=A1)*(Sheet2!A1:A20=2010)*(Sheet2!C1:C20))

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

Top