WalChar17

New Member
Joined
Jun 15, 2018
Messages
3
I was curious if there is any possible way to run a function within the if function such as: =IF(IS BLANK(G3),"","") but I would like to insert the function =DATEDIF($G3,$M3,"M") in place for value_if_false so if the IF is false it would calculate that formula and display accordingly
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I was curious if there is any possible way to run a function within the if function such as: =IF(IS BLANK(G3),"","") but I would like to insert the function =DATEDIF($G3,$M3,"M") in place for value_if_false so if the IF is false it would calculate that formula and display accordingly

? ... just go ahead and position the secondary formula in the value_if_false field :
=IF(ISBLANK(G3),"",DATEDIF($G3,$M3,"M"))
 
Upvote 0
The problem with that is then the cells within the DATEDIF function aren't highlighted for use, they are just a letter and number not active cell.
 
Upvote 0
IF function #NUM!

When I type =IF(ISBLANK(G9),"",DATEDIF($G9,$M9,"M")) It works but when I do =IF(ISBLANK(G10),"",DATEDIF($G10,$M10,"M")) it gives me #NUM ! And I can't figure out why...
 
Upvote 0
Re: IF function #NUM!

What values do you have in the cells?
 
Upvote 0
Re: IF function #NUM!

@WalChar17.... Try the following instead:

=IF(G10="","",DATEDIF($G10,$M10,"M"))

G10 might appear blank, but its value is actually the null string (""), just like the result of this formula.

Only use ISBLANK when you want to be sure the cell is empty (no value), distinct from merely appearing blank.

PS.... Why do you use G10 in one place, but $G10 in another?
 
Upvote 0
Re: IF function #NUM!

@WalChar17
Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread. (rule 12 here: Forum Rules).
I have merged both threads on this occasion.
 
Upvote 0

Forum statistics

Threads
1,214,967
Messages
6,122,503
Members
449,090
Latest member
RandomExceller01

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