Date counter

Wharbin

New Member
Joined
Jul 20, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Good morning, so I am trying to count days between two dates. My issue is if the cell I want to use is blank then I want excel to utilize another cell with a date in it to generate a count. The formula I am using is =C2-A2 which generates a date count but I want to add if cell C2 is blank the use cell B2 and the new date result would be B2-A2. I have added a pic of the excel I’m working on.

thanks,
 

Attachments

  • 1BA2D3DB-E395-4199-840E-5633450DC176.png
    1BA2D3DB-E395-4199-840E-5633450DC176.png
    14.3 KB · Views: 2

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi & welcome to MrExcel.
How about
=if(C2="",B2,C2)-A2
 
Upvote 0
In case no one tells you today, YOU’RE AWESOME! Thank you, that works perfectly!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,222,644
Messages
6,167,270
Members
452,108
Latest member
Sabat01

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