Formula if one cell is within a range of numbers to return Year from next cell

bamroll

New Member
Joined
Jan 19, 2007
Messages
6
I have four columns. A is calendar month, B is calendar year, C is Fiscal month, D is going to be Fiscal year. Our fiscal year is April to May, April = Fiscal month #1 , May = 2, etc.
I need a formula for the fiscal year that will look at the fiscal month cell. Say C2 is either 1,2,3 fiscal month. My calendar year in B2 is 2018. I need it to return 2017 in D2 fiscal year.
If C2 is 4 through 12, then I need it to return 2018 (same as the calendar year). Thanks for any suggestions or assistance.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

gaz_chops

Well-known Member
Joined
Apr 29, 2003
Messages
6,468
Platform
  1. MacOS
Try

=B1-(IF(MONTH(A1)<=3,1,0))

Code:
[TABLE="width: 348"]
<colgroup><col width="87" span="4" style="width: 65pt;"></colgroup><tbody>[TR]
[TD="class: xl63, width: 87, align: right"]Jan[/TD]
[TD="width: 87, align: right"]2018[/TD]
[TD="class: xl63, width: 87, align: right"]Jan[/TD]
[TD="width: 87, align: right"]2017[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Feb[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Feb[/TD]
[TD="align: right"]2017[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Mar[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Mar[/TD]
[TD="align: right"]2017[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Apr[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Apr[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]May[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]May[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Jun[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Jun[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Jul[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Jul[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Aug[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Aug[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Sep[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Sep[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Oct[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Oct[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Nov[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Nov[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Dec[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Dec[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Jan[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Jan[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Feb[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Feb[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Mar[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Mar[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Apr[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Apr[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]May[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]May[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Jun[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Jun[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Jul[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Jul[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Aug[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Aug[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Sep[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Sep[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Oct[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Oct[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Nov[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Nov[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Dec[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Dec[/TD]
[TD="align: right"]2019[/TD]
[/TR]
</tbody>[/TABLE]
 

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,402
Office Version
  1. 365
Platform
  1. Windows
All sorts of ways to do this depending on what you actually have in the cells. If you mean the months are numbers then maybe:

=B2-(C2>3)
 

bamroll

New Member
Joined
Jan 19, 2007
Messages
6
Tried and I'm getting an error. Stepping through it tells me the (MONTH(A1) part of the formula is #VALUE . Does the A column need to be formatted? I am testing it on a blank worksheet and typed Jan in A1 and C1. I have the formula in D1 but it is not working.


Try

=B1-(IF(MONTH(A1)<=3,1,0))

Code:
[TABLE="width: 348"]
<colgroup><col width="87" span="4" style="width: 65pt;"></colgroup><tbody>[TR]
[TD="class: xl63, width: 87, align: right"]Jan[/TD]
[TD="width: 87, align: right"]2018[/TD]
[TD="class: xl63, width: 87, align: right"]Jan[/TD]
[TD="width: 87, align: right"]2017[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Feb[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Feb[/TD]
[TD="align: right"]2017[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Mar[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Mar[/TD]
[TD="align: right"]2017[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Apr[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Apr[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]May[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]May[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Jun[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Jun[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Jul[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Jul[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Aug[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Aug[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Sep[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Sep[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Oct[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Oct[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Nov[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Nov[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Dec[/TD]
[TD="align: right"]2018[/TD]
[TD="class: xl63, align: right"]Dec[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Jan[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Jan[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Feb[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Feb[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Mar[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Mar[/TD]
[TD="align: right"]2018[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Apr[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Apr[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]May[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]May[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Jun[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Jun[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Jul[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Jul[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Aug[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Aug[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Sep[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Sep[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Oct[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Oct[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Nov[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Nov[/TD]
[TD="align: right"]2019[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]Dec[/TD]
[TD="align: right"]2019[/TD]
[TD="class: xl63, align: right"]Dec[/TD]
[TD="align: right"]2019[/TD]
[/TR]
</tbody>[/TABLE]
 

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,402
Office Version
  1. 365
Platform
  1. Windows
Use MONTH(1&A1) or if it still errors try MONTH(A1&1)
 

Watch MrExcel Video

Forum statistics

Threads
1,130,186
Messages
5,640,688
Members
417,161
Latest member
Devon150

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
Top