If cell contains text - return this value and the next 12 rows

CathalP1992

New Member
Joined
Nov 30, 2022
Messages
9
Office Version
  1. 2021
Platform
  1. Windows
Hi there,

Be really grateful for any help on this.

I have a called Front Month where I type manually the current month and year (ie. APR23)

I am looking for a simple way to tell excel if I change this value, that excel should find the next matching value and the X number of rows below it.

image


So if I change front month value, the series of month values will change based on the front month. There is another helper sheet where I have a list of months from Jan23-Dec25 so that my list will chose the next 12 consecutive.

Any help greatly appreciated.

Cathal.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Book1
ABCDE
7Mar23Mar23Jan23
8Apr23Feb23
9May23Mar23
10Jun23Apr23
11Jul23May23
12Aug23Jun23
13Sep23Jul23
14Oct23Aug23
15Nov23Sep23
16Dec23Oct23
17Jan24Nov23
18Feb24Dec23
19Jan24
20Feb24
21Mar24
22Apr24
Sheet1
Cell Formulas
RangeFormula
C7C7=INDEX(Months,MATCH($B$7,Months,0))
C8C8=INDEX(Months,MATCH($B$7,Months,0)+1)
C9C9=INDEX(Months,MATCH($B$7,Months,0)+2)
C10C10=INDEX(Months,MATCH($B$7,Months,0)+3)
C11C11=INDEX(Months,MATCH($B$7,Months,0)+4)
C12C12=INDEX(Months,MATCH($B$7,Months,0)+5)
C13C13=INDEX(Months,MATCH($B$7,Months,0)+6)
C14C14=INDEX(Months,MATCH($B$7,Months,0)+7)
C15C15=INDEX(Months,MATCH($B$7,Months,0)+8)
C16C16=INDEX(Months,MATCH($B$7,Months,0)+9)
C17C17=INDEX(Months,MATCH($B$7,Months,0)+10)
C18C18=INDEX(Months,MATCH($B$7,Months,0)+11)
Named Ranges
NameRefers ToCells
Months=Sheet1!$E$7:$E$21C7:C18
 
Upvote 0
Upvote 0
Book1
ABCDE
7Mar23Mar23Jan23
8Apr23Feb23
9May23Mar23
10Jun23Apr23
11Jul23May23
12Aug23Jun23
13Sep23Jul23
14Oct23Aug23
15Nov23Sep23
16Dec23Oct23
17Jan24Nov23
18Feb24Dec23
19Jan24
20Feb24
21Mar24
22Apr24
Sheet1
Cell Formulas
RangeFormula
C7C7=INDEX(Months,MATCH($B$7,Months,0))
C8C8=INDEX(Months,MATCH($B$7,Months,0)+1)
C9C9=INDEX(Months,MATCH($B$7,Months,0)+2)
C10C10=INDEX(Months,MATCH($B$7,Months,0)+3)
C11C11=INDEX(Months,MATCH($B$7,Months,0)+4)
C12C12=INDEX(Months,MATCH($B$7,Months,0)+5)
C13C13=INDEX(Months,MATCH($B$7,Months,0)+6)
C14C14=INDEX(Months,MATCH($B$7,Months,0)+7)
C15C15=INDEX(Months,MATCH($B$7,Months,0)+8)
C16C16=INDEX(Months,MATCH($B$7,Months,0)+9)
C17C17=INDEX(Months,MATCH($B$7,Months,0)+10)
C18C18=INDEX(Months,MATCH($B$7,Months,0)+11)
Named Ranges
NameRefers ToCells
Months=Sheet1!$E$7:$E$21C7:C18
this worked thank you. Last question is it possible to get the letters of the month in upper case?
 
Upvote 0
Last edited:
Upvote 0
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

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