Trouble with Sum(if...)

plant007

Board Regular
Joined
Jun 2, 2011
Messages
55
Office Version
  1. 2019
Platform
  1. Windows
HI All

I posted on this site a few days ago and was helped greatly by people on here. I have tried to build on that work but I have hit a wall. I am trying to write a formula;

'If cell/s in column A is say dept X , then if the correponding entries in column D are numbers, if the corresponding entries in column D are not equal to the corresponding entries in column C, then count where the corrrespondng entries in column F are less than or equal to the corresponding entries in Column D

To help
Column A = Dept
Column C = Planned Date
Column D = Latest Approve Date
Column F = Completion date

My equation so far;
Code:
{=SUM(IF($A$50:$A$62="MoD",ISNUMBER($D$50:$D$62),$D$50:$D$62<>$C$50:$C$62),$F$50:$F$62<=$D$50:$D$62)}
I get the result 0 when it should be a 3

Any help greatly appreciated
Thanks
Andy
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Possibly

=SUMPRODUCT(--(A1:A100="Dept X"),--ISNUMBER(D1:D100),--(D1:D100<>C1:C100),--(F1:D100<c1:c100),--(f1:f100><=D1:D100))</c1:c100),--(f1:f100>
 
Upvote 0
You beat me to it:
Code:
=SUMPRODUCT(--(A2:A4="Dept X"),--(C2:C4<>D2:D4),--(F2:F4<=D2:D4))
Plus I missed second part but I guess it has to be date always.

Just to add a bit of value, take a look at this:
http://www.vbaexpress.com/forum/forumdisplay.php?f=98
Very good explanation SUMPRODUCT formula by Bob Philips aka XLD.
 
Last edited:
Upvote 0
HI All

I posted on this site a few days ago and was helped greatly by people on here. I have tried to build on that work but I have hit a wall. I am trying to write a formula;

'If cell/s in column A is say dept X , then if the correponding entries in column D are numbers, if the corresponding entries in column D are not equal to the corresponding entries in column C, then count where the corrrespondng entries in column F are less than or equal to the corresponding entries in Column D

To help
Column A = Dept
Column C = Planned Date
Column D = Latest Approve Date
Column F = Completion date

My equation so far;
Code:
{=SUM(IF($A$50:$A$62="MoD",ISNUMBER($D$50:$D$62),$D$50:$D$62<>$C$50:$C$62),
$F$50:$F$62<=$D$50:$D$62)}
I get the result 0 when it should be a 3

Any help greatly appreciated
Thanks
Andy

Continuing with the set up you attempted...

Control+shift+enter, not just enter:
Code:
=SUM(
     IF($A$50:$A$62="MoD",
     IF(ISNUMBER($D$50:$D$62),
     IF(1-($D$50:$D$62=$C$50:$C$62),
     IF($F$50:$F$62<=$D$50:$D$62,1)))))
 
Upvote 0
Many thanks VoG, taurean and Aladin for your help. Weekend now so I will plug these formulas in next week

Have a nice w/e
Andy
 
Upvote 0
Many thanks for all your help - each formula works beautifully!
 
Upvote 0

Forum statistics

Threads
1,224,502
Messages
6,179,126
Members
452,890
Latest member
Nikhil Ramesh

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