Conditional formatting with sumifs

Yulyo

Board Regular
Joined
Jul 17, 2017
Messages
94
Hello all,

So i came up with a formula that i must use in conditional formatting, but i just can't make it work. What am i missing?

This is the normal formula that is working if used normally (not in conditional formatting):
=IF(AND(YEAR('Sheet2'!A16)=YEAR(TODAY()); SUMIFS(Table2[Delivery
plan];Table2[Date];"<="&'Sheet2'!$A$16)='Sheet2'!$D$16); "OK"; "NOTOK")

What this formula does, is this:
- if the year in cell A16 from Sheet2 is in this year
and
sum from column "Delivery plan" is identical with cell D16 from Sheet2,
THEN
fill cell with green

Any help please? :)
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You cannot use table references in CF formula, you will need to change it to normal range references.
 
Upvote 0
Why have you used ; instead of , in the formula???
 
Upvote 0
Separators in formula vary depending on locale.
 
Upvote 0
@Yulyo
Another option is you create two named ranges, one for each of the table columns & use then in the formula.
 
Upvote 0
You cannot use table references in CF formula, you will need to change it to normal range references.
So i changed the table references and the resulted formula should be:
=IF(AND(YEAR(Sheet2'!A16)=YEAR(TODAY()); SUMIFS($J$6:$J$2201;$B$6:$B$2201;"<="&'Sheet2'!$A$16)='Sheet2'!$D$16))

Paste it like this in CF, choosed the colour, but it's not working....
 
Upvote 0
You don't need the If statement in CF, try
=AND(YEAR(Sheet2'!A16)=YEAR(TODAY()); SUMIFS($J$6:$J$2201;$B$6:$B$2201;"<="&'Sheet2'!$A$16)='Sheet2'!$D$16)
 
Upvote 0
I recieved an error when applied the CF: "There is a problem with the formula"

Edit: it's working :love:

Thank you all for your help!
 
Upvote 0

Forum statistics

Threads
1,215,161
Messages
6,123,380
Members
449,097
Latest member
Jabe

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