Find value in cell to left of named range

Jephph

New Member
Joined
Mar 22, 2021
Messages
14
Office Version
  1. 365
Platform
  1. MacOS
I'm designing a form and each datapoint is a named range. The cell directly to the left of the named range is the label for the datapoint. I want to create a list of all the labels in the form on another sheet and feel I need a formula that takes the named range and gives me the value of the cell to the left without having to name the label cell as well. The label name can change while the named range won't so I want my list of labels to update automatically. Google isn't helping me with this. Not sure it is even possible.

PS. In a perfect world, I'd have a list of the named ranges in column B and their Labels in column A and the value of the named range in column C, with the values in A and C based on what's written in B. Hope that makes sense. Couldn't find anything about using the contents of a cell as a named range reference in a formula.

PPS. Trying to do all of this without macros, but if that's the only way it has to be foolproof.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Name of Named Range is in B1

One column to the left of the name range
Excel Formula:
=OFFSET(INDIRECT(B1),0,-1)

Value of Named Range
Excel Formula:
=INDIRECT(B1)
 
Upvote 0
Thank you for replying so quickly! However, when I replace B1 with the name of a range, I get a #REF error.

For example...
=OFFSET(INDIRECT(SS_UnitType),0,-1)
 
Upvote 0
If you use the Name within the formula, surround the name with quotes

Excel Formula:
=OFFSET(INDIRECT("SS_UnitType"),0,-1)

Or just use the Named Range without the INDIRECT Function...
Excel Formula:
=OFFSET(SS_UnitType,0,-1)
=SS_UnitType
 
Last edited:
Upvote 0
Solution
OK, we're getting there! Thank you!

However, I get a #REF error when I try this...
B1 = "SS_UnitType"
=OFFSET(INDIRECT(B1),0,-1)
 
Upvote 0
Hi Jephph,

I'm not sure I'm following you. How can a single cell contain the value of a Named range?

Here's something along the lines of what you ask.
Jephph.xlsx
CDEFGH
1MonthMonth123
2AnimalAnimalCatDogMole
Sheet1
Cell Formulas
RangeFormula
C1C1=INDEX($A$1:$W$97,ROW(MRange),COLUMN(MRange)-1)
C2C2=INDEX($A$1:$W$97,ROW(ARange),COLUMN(ARange)-1)
Named Ranges
NameRefers ToCells
ARange=Sheet1!$F$2:$H$2C1:C2
MRange=Sheet1!$F$1:$H$1C1:C2
 
Upvote 0
Hi Jephph,

I'm not sure I'm following you. How can a single cell contain the value of a Named range?

Here's something along the lines of what you ask.
Jephph.xlsx
CDEFGH
1MonthMonth123
2AnimalAnimalCatDogMole
Sheet1
Cell Formulas
RangeFormula
C1C1=INDEX($A$1:$W$97,ROW(MRange),COLUMN(MRange)-1)
C2C2=INDEX($A$1:$W$97,ROW(ARange),COLUMN(ARange)-1)
Named Ranges
NameRefers ToCells
ARange=Sheet1!$F$2:$H$2C1:C2
MRange=Sheet1!$F$1:$H$1C1:C2
My named ranges contain a single value. For example, SS_UnitType references H10 on the Support Schedule sheet.
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

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