Row reference in a formula when the row can move about.

Eamonn100

Board Regular
Joined
Nov 12, 2015
Messages
156
Hi,

I'm using =VLOOKUP("Fiscal Period ",$A:$AB,COUNTA(1:1),0) to find the end of a row. The problem is sometimes Fiscal Period isn't in row 1:1. Is there away for me to reference what ever row reference Fiscal Period is in. e.g. If Fiscal Period was in row 5:5 my formula would be =VLOOKUP("Fiscal Period ",$A:$AB,COUNTA(5:5),0)

Below is a formula for returning the row reference but it's not working properly when I incert it into the main formula, e.g. =VLOOKUP("Fiscal Period ",$A:$AB,COUNTA(MATCH("Fiscal Period ",A:A,0)&":"&MATCH("Fiscal Period ",A:A,0)),0)

=MATCH("Fiscal Period ",A:A,0)&":"&MATCH("Fiscal Period ",A:A,0) This on it's own returns It returns 1:1.

abcdefghijklmnopqrstuvwxyzaaab
1Fiscal PeriodDec-05Dec-06Dec-07Dec-08Dec-09Sep-10Sep-11Sep-12Sep-13Sep-14Dec-15TTM/currentMar-13Jun-13Sep-13Dec-13Mar-14Jun-14Sep-14Mar-15Jun-15Sep-15Dec-15Mar-16Jun-16Sep-16

<tbody>
</tbody>
 
Last edited:

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I've found out that my formula works fine when on the same sheet as the information but when I try to use it from another sheet (as I have a copy/paste sheet for the information and a working out sheet for formulas I use to extract the info I need) it doesn't work properly.

Can anyone see why this would work when on the same sheet but not when it's on a different sheet to the info?

Prehapes a simpler way to find the row reference than my formula. =MATCH("Fiscal Period ",A:A,0)&":"&MATCH("Fiscal Period ",A:A,0)
 
Upvote 0
Hi,

I'm using =VLOOKUP("Fiscal Period ",$A:$AB,COUNTA(1:1),0) to find the end of a row. The problem is sometimes Fiscal Period isn't in row 1:1. Is there away for me to reference what ever row reference Fiscal Period is in. e.g. If Fiscal Period was in row 5:5 my formula would be =VLOOKUP("Fiscal Period ",$A:$AB,COUNTA(5:5),0)

Below is a formula for returning the row reference but it's not working properly when I incert it into the main formula, e.g. =VLOOKUP("Fiscal Period ",$A:$AB,COUNTA(MATCH("Fiscal Period ",A:A,0)&":"&MATCH("Fiscal Period ",A:A,0)),0)

=MATCH("Fiscal Period ",A:A,0)&":"&MATCH("Fiscal Period ",A:A,0) This on it's own returns It returns 1:1.

abcdefghijklmnopqrstuvwxyzaaab
1Fiscal PeriodDec-05Dec-06Dec-07Dec-08Dec-09Sep-10Sep-11Sep-12Sep-13Sep-14Dec-15TTM/currentMar-13Jun-13Sep-13Dec-13Mar-14Jun-14Sep-14Mar-15Jun-15Sep-15Dec-15Mar-16Jun-16Sep-16

<tbody>
</tbody>


Edit
The first formula should read. =VLOOKUP("Fiscal Period ",$A:$AB,COUNTA(INDIRECT(MATCH("Fiscal Period ",A:A,0)&":"&MATCH("Fiscal Period ",A:A,0))),0)
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,666
Members
449,114
Latest member
aides

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