IFERROR and IF ISBLANK in same formula

reneekeane

New Member
Joined
Oct 19, 2020
Messages
7
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
hi there, i am trying to write a formula that can do if error (to get rid of the #VALUE results and IF(ISBLANK) to take care of not doing the calculation if the data has not been entered yet in the same formula.

so if B2 has text and not a date (IFERROR) and then in B2 is blank then "" otherwise B2-B1
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try
=IF(OR(ISTEXT(B2),B2=""),"",B2-B1)
Thanks, that works in most cases but sometimes there may be text in B1 aswell instead, is there something else to add into the formula so that is works for both B1 and B2 when either is not a date or blank? thanks
 
Upvote 0
Thanks, that works in most cases but sometimes there may be text in B1 aswell instead, is there something else to add into the formula so that is works for both B1 and B2 when either is not a date or blank? thanks
also sometimes B1 might be the cell that is blank
 
Upvote 0
=IF(OR(ISTEXT(B2),ISTEXT(B1),B2="",B1=""),"",B2-B1)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,983
Messages
6,122,591
Members
449,089
Latest member
Motoracer88

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