Categorize Data into Fiscal Year Based on Transaction Date

HotDogHippo

New Member
Joined
May 19, 2021
Messages
2
Office Version
  1. 365
Hello,

I have a list of financial data that spans 3 fiscal years.

Fiscal year 2018 - April 1, 2018 - March 31st, 2019
Fiscal Year 2019 - April 1, 2019 - March 31st, 2020
Fiscal Year 2020 - April 1, 2020 - March 31st, 2021

The transaction date (YYYYMMDD) is in Column Q and wondering if it's possible to have a formula in Column R to identify which fiscal year the transaction falls into based on the above categories.

I.E.

Q R
Date of Transaction Fiscal Year
20180403 20182

Any help would be much appreciated...
Thanks!

20180403​
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi HotDogHippo,

Does this work for you?

HotDogHippo.xlsx
QR
1DateFiscal Year
2201701012016
3201804032018
4201909092019
5202004012020
6202003312019
Sheet1
Cell Formulas
RangeFormula
R2:R6R2=IF(MID(Q2,5,2)+0<4,LEFT(Q2,4)-1,LEFT(Q2,4))+0
 
Upvote 0
Hi HotDogHippo,

Does this work for you?

HotDogHippo.xlsx
QR
1DateFiscal Year
2201701012016
3201804032018
4201909092019
5202004012020
6202003312019
Sheet1
Cell Formulas
RangeFormula
R2:R6R2=IF(MID(Q2,5,2)+0<4,LEFT(Q2,4)-1,LEFT(Q2,4))+0

Hi Toadstool,

Amazing....That does work...are you able to walk me through the logic of why it works?? Many thanks :)
 
Upvote 0
Hi Toadstool,

Amazing....That does work...are you able to walk me through the logic of why it works?? Many thanks :)
You're welcome!
The +0 parts are to make sure the numbers are treated as numeric, not text.
MID(Q2,5,2) checks the date characters 5 and 6, the month. If the month is less than 4 (April) then the fiscal year is last year, so I take the first 4 characters (year) and subtract one.
If the month is 4 or higher then it's the same fiscal year as the date, so I take the first 4 characters and add zero to force numeric.
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,264
Members
448,558
Latest member
aivin

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