Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2024, 04:05 AM
Marcia's Avatar
Marcia Marcia is offline Named Range as reference in a formula Windows 11 Named Range as reference in a formula Office 2021
Expert
Named Range as reference in a formula
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default Named Range as reference in a formula

Hi. I have a formula that uses dynamic named range as references as follows.

=INDEX(Kin1_,Match($D6,Item,0))

Is it possible that in $k$2 I enter Kin2_. How do I make the formulae in column G of BoMTemplateBldg sheet to change the column number Kin1_ to Kin2_? The col changes according to what is entered in $k2.
Attached is the workbook I am working on.
Thank you.
Attached Files
File Type: xlsm MS Excel Workshop Engg.xlsm (53.4 KB, 3 views)
Reply With Quote
  #2  
Old 03-27-2024, 12:03 AM
xor xor is offline Named Range as reference in a formula Windows 11 Named Range as reference in a formula Office 2021
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Maybe like in the attached
Attached Files
File Type: xlsm MS Excel Workshop Engg_2.xlsm (54.2 KB, 3 views)
Reply With Quote
  #3  
Old 03-27-2024, 04:50 AM
p45cal's Avatar
p45cal p45cal is offline Named Range as reference in a formula Windows 10 Named Range as reference in a formula Office 2021
Expert
 
Join Date: Apr 2014
Posts: 871
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

I was going to offer the same solution as xor, although if you want to copy down it might work better with INDIRECT($K$2) instead of INDIRECT(K2)
Reply With Quote
  #4  
Old 03-27-2024, 03:06 PM
Marcia's Avatar
Marcia Marcia is offline Named Range as reference in a formula Windows 11 Named Range as reference in a formula Office 2021
Expert
Named Range as reference in a formula
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Quote:
Originally Posted by xor View Post
Maybe like in the attached
Perfect. Thank you. I need to do some further reading on INDIRECT.
Reply With Quote
  #5  
Old 03-27-2024, 03:07 PM
Marcia's Avatar
Marcia Marcia is offline Named Range as reference in a formula Windows 11 Named Range as reference in a formula Office 2021
Expert
Named Range as reference in a formula
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Quote:
Originally Posted by p45cal View Post
I was going to offer the same solution as xor, although if you want to copy down it might work better with INDIRECT($K$2) instead of INDIRECT(K2)
Yes, I locked the reference. Thank you.
Reply With Quote
  #6  
Old 03-29-2024, 11:00 AM
TessaMurillo TessaMurillo is offline Named Range as reference in a formula Windows Vista Named Range as reference in a formula Office 2010
Advanced Beginner
 
Join Date: Mar 2024
Posts: 33
TessaMurillo has a little shameless behaviour in the past
Default

You can use the INDIRECT function to change the reference to a dynamic named range in a formula in cell G. Simply enter the name of the named range you want in cell $K$2 (for example, Kin2_), then change the formula as follows:
:=INDEX(INDIRECT($K$2 & "_"), MATCH($D6, Item, 0))
The formula will now automatically use the named range specified in cell $K$2.
Reply With Quote
  #7  
Old 03-29-2024, 04:26 PM
Marcia's Avatar
Marcia Marcia is offline Named Range as reference in a formula Windows 11 Named Range as reference in a formula Office 2021
Expert
Named Range as reference in a formula
 
Join Date: May 2018
Location: Philippines
Posts: 527
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Thank you Tessa.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Named Range as reference in a formula Mail Merge with Excel Named Range Rocki Mail Merge 1 01-10-2020 02:06 PM
How to reference a named range in a different file within a formula Brock297 Excel 1 10-25-2018 08:50 AM
Define a spreadsheet range using two named variables persist Excel 2 05-13-2014 10:56 PM
Named Range as reference in a formula Excel - move with tab through named range mjlaw Excel 4 03-26-2012 10:40 AM
Named Range as reference in a formula Named range drop-down jgelpi16 Excel 1 04-08-2011 03:08 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft