?
Solved

Create a named structure reference

Posted on 2014-10-05
11
Medium Priority
?
73 Views
Last Modified: 2014-10-05
Folks,
I've run into a problem where I would like to learn how to create a structure name to reference headers in a table:
 
To reference the headers =Source_Data[#Headers]

I'm can't seem to connect the dots.
0
Comment
Question by:Frank Freese
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 11

Assisted Solution

by:jkpieterse
jkpieterse earned 500 total points
ID: 40362320
I'm not sure in what context, in a formula, in VBA, ...?
Check out http://www.jkp-ads.com/articles/excel2007tablesvba.asp if it is VBA syntax you are looking for.
0
 

Author Comment

by:Frank Freese
ID: 40362323
I've been trying to edit the question as follows:

=INDEX(Source_Data[[#Headers],[Spend $]:[Cost / Sale]],,selection)

and I keep getting #NAME!
0
 
LVL 27

Assisted Solution

by:Glenn Ray
Glenn Ray earned 1500 total points
ID: 40362344
Using a structrured reference on the table headers like:
=Source_Data[#Headers]
yields an array, so it's not a displayable value.

However, if you were using this in an indexing or array function - or wanted to create a dynamic range name, it's perfectly usable.  For example, the name of the third header lable in your table would be:
=INDEX(Source_Data[#Headers],1,3)

Regards,
-Glenn
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 27

Assisted Solution

by:Glenn Ray
Glenn Ray earned 1500 total points
ID: 40362350
We cross-posted!  Looking at your follow-up, are you trying to do this in VBA?  "selection" makes me think so.

If so, are you trying to enter a formula in a cell with this reference or are you trying to determine the header lable based on the active cell's column on the sheet?

-Glenn
0
 

Author Comment

by:Frank Freese
ID: 40362351
One additional question please
[#Headers] is a predefined range and one does not have to define it in Name Manager?
0
 

Author Comment

by:Frank Freese
ID: 40362353
Actually, "selection" is a named range.
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 1500 total points
ID: 40362358
[#Headers] alone is not a defined range, but used with the Excel Table identifier, it can be.  And it's dynamic; will change as the table layout changes.

if "selection" is a named range, the only issue would be if the value is greater than 2 (only two columns referenced) or less than 1.

-Glenn

Resources:

Resources (Microsoft)
Using structured references with Excel tables
Use structured references in Excel table formulas
0
 

Author Comment

by:Frank Freese
ID: 40362368
"selection" is a cell reference (I'm not having a very good Sunday)
Thanks I'm clearer now and appreciate everyone's help!
0
 

Author Closing Comment

by:Frank Freese
ID: 40362369
thank you kindly
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40362371
You're welcome.  The links I posted are very helpful (for me, at least).

-Glenn
0
 

Author Comment

by:Frank Freese
ID: 40362389
Those will be read!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question