Cell Reference instead of number, in a range

tprez23

New Member
Joined
May 9, 2023
Messages
3
Platform
  1. Windows
I'm trying to replace a number in a cell reference with another cell reference. I know there are a series of & and "" to use but what makes this tricky is that I want it as part of a range in a formula. Example: I want to replace the 5 in both instances of the formula below with a cell reference (let's say B4) which has the number 5 in it.

=match($B$1,'Sheet1'!$A$5:$AI$5,0)
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
You can use INDIRECT for this
Excel Formula:
=MATCH($B$1,INDIRECT("'Sheet1'!$A$"&B4&":$AI$"&B4),0)
 
Upvote 0
Hi & welcome to MrExcel.
Another option that does not use volatile functions
Excel Formula:
=MATCH($B$1,INDEX(Sheet1!$A:$AI,B4,),0)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,756
Messages
6,126,691
Members
449,329
Latest member
tommyarra

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