# If Blank

#### Dans Issues

##### New Member
Hi all,

I'm completing a formulae for a date, lets say:

Date of assessment H3 = 2022
Date of Birth K5 = 1978
Age L5 = 44

I have sorted this (L5=H3-K5), however, if K is blank I do not want L5 to return 2022 I would like to to return blank or -

I have Tried =IF(K5=",",H3-K5) or =IF(ISBLANK",",H3-K5) from other posts however I have no joy, I either see "False" or "computer say no"

Can anyone help?

Thanks

### Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi,

Use one of these:

Excel Formula:
``=IF(K5="","",H3-K5)``

Excel Formula:
``=IF(OR(K5="",H3=""),"",H3-K5)``

The 1st one only checks if K5 is blank, if so, return blank.
The 2nd one checks both K5 and H3 for blank, if either is blank, return blank

Hi Dans Issues,

Try
Excel Formula:
``=IF(ISBLANK(K5),"",H3-K5)``

when I pull the formulae down the below number are minus as H3 is altered to H4 and so forth
How do I Lock H3 as H3 (2022) is constant.

Use these:

Excel Formula:
``=IF(K5="","",H\$3-K5)``

Excel Formula:
``=IF(OR(K5="",H\$3=""),"",H\$3-K5)``

You are a Gentleman,

Formula complete

You're welcome, thanks for the feedback.

Replies
3
Views
123
Replies
3
Views
246
Replies
5
Views
268
Replies
6
Views
105
Replies
7
Views
108

1,207,442
Messages
6,078,582
Members
446,350
Latest member
FrancieRech

### 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.

### Which adblocker are you using?

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

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