Help with formula using an ampersand for year

RunTime91

Active Member
Joined
Aug 30, 2012
Messages
290
Office Version
  1. 365
Greetings...

I need a formula that provides calculations for random dates which may extend backwards into last year.

In A3 is an emp. hire date (which may be a date before this year) and I want to subtract from that date today's date

The formula doesn't error but since the hire date is entered as a date and the concatenation I use in the formula puts quotation marks on the date it provides the wrong result.

Any idea's would be great...

Code:
=IF(B3-A3<91,0,IF(A3<"3/1/"&YEAR(TODAY()),56,IF(AND(A3>="3/1/"&YEAR(TODAY()),A3<"5/1/"&YEAR(TODAY())),32,IF(AND(A3>="5/1/"&YEAR(TODAY()),A3<"9/30/"&YEAR(TODAY())),16,IF(A3>="10/1/"&YEAR(TODAY()),56,0)))))
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Rather than using this construction for a date

"3/1/"&YEAR(TODAY())

Try using DATE function, like this

DATE(YEAR(TODAY()),3,1)
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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