Dynamic Row Reference

stamlin

New Member
Joined
Jul 20, 2022
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
I have searched the forums to find the answer to this but can't find anything that answers the specific question...

To give some context I have one worksheet which looks at stocked quantities of component part numbers in a given week. This is the 'Sheet2' referred to in the example below. In this worksheet I have a column (column BR), which tells me whether we have zero quantities, thus preventing build going ahead (value in this case is YES) or whether we have no zero quantities and we are able to build (NO).

In another worksheet (let's say 'Sheet1'), I consider the build plan i.e. the quantities we would like to build in a week. I then use a lookup, looking at the 'Sheet2' worksheet to see whether we have any zero balances in that week.
If the returned value for zero quantities in a given week = YES, I want to look down the column to find the first instance that zero quantities = NO. Note the Sheet2 is set up with a row per week, hence needing to look down.

To do this I basically want to say "if zero quantities in week = YES, then look at the next week and keep looking until we see a NO".

The closest I've been able to find is the attempt below. It returns an error. In the statement INDIRECT(BR&P3) BR is the column, and P3 is a cell which contains the row number I'd like to use.

=MATCH("NO",'Sheet2'!(INDIRECT(BR&P3)):BR146,0)


It's difficult to articulate what I'm trying to achieve, so hopefully the above makes sense! I have attached a snip of the screen which help to explain the references.

Thanks in advance for any suggestions.
 

Attachments

  • Dynamic Row Snip.JPG
    Dynamic Row Snip.JPG
    26.8 KB · Views: 11

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
try this..
Excel Formula:
=MATCH("NO",INDEX($BR:$BR,P3):$BR$146,0)
or this if you don't want the intermediate calculation:
Excel Formula:
=MATCH("NO",INDEX($BR:$BR,O3+1):$BR$146,0)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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