IF statement issues

cynthi263

New Member
Joined
May 14, 2019
Messages
19
I need to adjust the below to say if what is in orange is >=12 then return a value of "monthly"...right now it works how it is and brings back a value of 12, instead of 12 i'd like it to say monthly. I have tried adding another if statement but i keep getting 0 or errors. It's probably something small or out of order but i cannot figure it out.


=IF(M2="Y",ROUND((J2-H2+1)/30,0),"ANNUAL")
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Try this:

=IF(M2="Y",IF(ROUND((J2-H2+1)/30,0)>=12,"monthly","It is less than 12"),"ANNUAL")
 
Upvote 0
The general format for nested IFs, when you're examining one condition first and then (if that one is true) another condition is:
=if( FIRST condition, if( SECOND condition, BOTH conditions true, FIRST condition true AND SECOND condition false), FIRST condition false AND SECOND condition not evaluated)

So I'm guessing that what you want is:
=IF(M2="Y", if( ROUND((J2-H2+1)/30 >= 12, "Monthly", 0) ,"ANNUAL"))
But I'm really guessing, because the term you left us in orange seems to be an entire IF scenario on its own, with the trailing ",0" term.

Alternative structures, for different logic can look like:
=if( and( FIRST condition, SECOND condition), BOTH are true, EITHER is false)
and so forth
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
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