# Nubmer of Days where Cell = Blank, IF cell blank then use Todays Date formula.. HELP!

#### steveaus

##### New Member
Hi Guys,

Just a quick one here, cant wrack my brain around it!

A1 Open (date), A2 (Close Date) A3 (Total Days)

Obviously I can use the A3 = A2-A1 to get the number of days taken to close, though if A2 (the close date) is blank, I want the formula to use the current date

So for instance, A1 = 20/05/2015, A2 = Blank, therefore A3 = (todays date - A1) so a simple IF cell = blank use this formular, if value use =A2-A1

Can anyone help me out on this quick on?

Cheers!

### 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 and welcome to the forum.

= IF(B1="",TODAY(),B1) - A1

Format the cell with this formula as General or Number. Excel may try to set it with a Date format.

Last edited:
awsome, perfect, I was forgetting the ,B1 after the TODAY() - Appreciate it AlphaFrog!

Also one more question.

Lets say Cell A is blank, can I create an IF Function to make cell C Blank if there is no data in either Cell A or Cell B?

Also one more question.

Lets say Cell A is blank, can I create an IF Function to make cell C Blank if there is no data in either Cell A or Cell B?

You're welcome.

=IF(A1="","",IF(B1="",TODAY(),B1) - A1)

Replies
18
Views
4K
Replies
1
Views
332
Replies
3
Views
1K
Replies
1
Views
973
Replies
3
Views
317

1,196,056
Messages
6,013,157
Members
441,751
Latest member
336448

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