IF statements with dates and condition

Lilly13m

New Member
Joined
Jan 26, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Example

I have lease start date of nov 1/2020 and need to have the calculation in percentage of how much until the end of year ..

Nov1-dec 31 =60 days out of 365 = 16.43%


IF STATEMENT

So if column "a" end date is blank then percentage is 100%
If column "a"has a date, ( ie 11/01/2020) then calculate The percentage .. to 12/31/2020 . which should come out to 16.43%
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try this.
Code:
=IF(A2="", "", (DATE(YEAR(A2), 12, 31)-A2)/365)
 
Upvote 0
I wrote this
IFS

Logical test1 is blank (a2)
Value if true "100"
Logical test. 2 ... which do I insert
 
Upvote 0
Oops, didn't do the blank cell part correctly.

It should be this.
Code:
=IF(A2="", 1, (DATE(YEAR(A2), 12, 31)-A2)/365)
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,665
Members
449,045
Latest member
Marcus05

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