If 'true' perform 2 different formulas, if 'false' return blank

gtd526

Well-known Member
Joined
Jul 30, 2013
Messages
696
Office Version
  1. 2019
Platform
  1. Windows
Hello,
I'm using the following formula. If the first 'if' is true, then perform 2 separate If's, if either of the 2 if's are true, then return 'pd'. which it does correctly.
If the first if is false then return "", currently it returns 'false'.
How can I return "" when the first If is false?

Excel Formula:
IF(MONTH(K10)&YEAR(K10)=MONTH('BOA-9547'!$D$3)&YEAR('BOA-9547'!$D$3),IF(COUNTIFS('BOA-9547'!$A$3:$A$33,$N$8,'BOA-9547'!$D$3:$D$33,">0"),"pd",IF(COUNTIFS('BOA-9547'!$G$3:$G$33,$N$8,'BOA-9547'!$J$3:$J$33,">0"),"pd","")))

Thank you
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
This should help.
Excel Formula:
=IF(MONTH(K10)&YEAR(K10)=MONTH('BOA-9547'!$D$3)&YEAR('BOA-9547'!$D$3);IF(COUNTIFS('BOA-9547'!$A$3:$A$33;$N$8;'BOA-9547'!$D$3:$D$33;">0");"pd";IF(COUNTIFS('BOA-9547'!$G$3:$G$33;$N$8;'BOA-9547'!$J$3:$J$33;">0");"pd";""));"")
 
Upvote 0
Solution
This should help.
Excel Formula:
=IF(MONTH(K10)&YEAR(K10)=MONTH('BOA-9547'!$D$3)&YEAR('BOA-9547'!$D$3);IF(COUNTIFS('BOA-9547'!$A$3:$A$33;$N$8;'BOA-9547'!$D$3:$D$33;">0");"pd";IF(COUNTIFS('BOA-9547'!$G$3:$G$33;$N$8;'BOA-9547'!$J$3:$J$33;">0");"pd";""));"")
I replaced your semicolons with commas and it worked.
Thank you
 
Upvote 0
I replaced your semicolons with commas and it worked.
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.

BTW, you could eliminate both of those later IF functions and shorten your formula a bit as follows.
Excel Formula:
=IF(AND(TEXT(K10,"my")=TEXT('BOA-9547'!$D$3,"my"),COUNTIFS('BOA-9547'!$A$3:$A$33,$N$8,'BOA-9547'!$D$3:$D$33,">0")+COUNTIFS('BOA-9547'!$G$3:$G$33,$N$8,'BOA-9547'!$J$3:$J$33,">0")),"pd","")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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