Multiple "IF" formula issue

garymu16

Board Regular
Joined
Sep 15, 2006
Messages
139
=sum(IF((Pipeline!A2:A65000,$G$6)*(Pipeline!G2:G65000>79), Pipeline!D2:D65000))

Can anyone see where I'm going wrong here?

The first two commands I'm trying to establish are

1. Does the name match $G$6
And
2. Does it also have a probability higher than 79

If so sum range D2:D65000 for all info that meets the two criteria.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi garymu16

Instead of
... (Pipeline!A2:A65000,$G$6) ...

try

... (Pipeline!A2:A65000=$G$6) ...

HTH
PGC
 
Upvote 0
Hi tried that but I think it could be either the 2nd command or the combination thats throwing it.
 
Upvote 0
Hi garymu16:

If I understand you correctly, the following should work for you ...

array formula =SUM(IF(Pipeline!A2:A6500=G6,IF(G6>79,Pipeline!D2:D6500)))

or

=SUMPRODUCT((Pipeline!A2:A6500=G6)*(G6>79),Pipeline!D2:D6500)
 
Upvote 0
Hi again

=sum(IF((Pipeline!A2:A65000,$G$6)*(Pipeline!G2:G65000>79), Pipeline!D2:D65000))

1. Does the name match $G$6
And
2. Does it also have a probability higher than 79

I was reading your first post nd one thing is not clear to me. I'll try to explain:

Pipeline!G2:G65000>79 must refer to "Does it also have a probability higher than 79 ".
This indicates that the column G is probabilities.

therefore

Pipeline!A2:A65000,$G$6 must refer to "Does the name match $G$6 "
This indicates that the column A has names.

How are you testing the names against $G$6, that is one of the probabilities?

Am I missing something?
PGC
 
Upvote 0
Hi pgc01,

Sorry maybe my initial post was a little unclear. $G$6 is a name, however it is on a different worksheet from Pipeline! which as you correctly point out uses column G to track probability.

Hope this is a bit clearer - Really appreciate your help guys. I need to pull this together for the powers that be and I'm struggling.
 
Upvote 0
garymu16

Is this it?
Code:
=SUMPRODUCT(--(Pipeline!A2:A65000=$G$6),--(Pipeline!G2:G65000>79),Pipeline!D2:D65000)

.. or perhaps this?
Code:
=SUMPRODUCT(--(Pipeline!A2:A65000=OtherSheetname!$G$6),--(Pipeline!G2:G65000>79),Pipeline!D2:D65000)
 
Upvote 0
Still not working! :rolleyes:

Sorry, I'm sure it's me. How would you write a formula to have 2 "if" elements on a single sheet?

As an example could someone let me know how I would work out the following:
Say A1 and B1 equalled 1 & 2 respectively how would I write the formula to say if A1 = 1 and B1 = 2 then sum A1.
 
Upvote 0
Hi Gary,

From the information you've given Peter's first SUMPRODUCT formula looks right to me. Why doesn't that work, what result do you get?

In what format are your probabilities? If they're percentages then use Peter's formula but change 79 to 0.79
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,387
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top