Solved

How do I use INDIRECT function to insert data from a reference cell?

Posted on 2011-09-09
5
206 Views
Last Modified: 2012-05-12
Hello experts,

It's Friday afternoon and I want to go home...   but I need some help here.

I want to create a cell formula to pull in reference data based on the header of the column.  See attached example.  Can you suggest a fix or a better way?

Thanks,
Gary
LCS-by-Activity-Code-08-2011-EE-.xls
0
Comment
Question by:garyrobbins
[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
5 Comments
 
LVL 34

Assisted Solution

by:Norie
Norie earned 50 total points
ID: 36512409
Gary

The formula in E6 refers to a worksheet using the value in E4 which is 11-08-01

There is no worksheet called that.
0
 
LVL 39

Expert Comment

by:nutsch
ID: 36512435
Your error comes from the sore lack of a 11-08-01 tab
0
 
LVL 39

Accepted Solution

by:
nutsch earned 450 total points
ID: 36512456
the #REF avoidance formula is
=IF(ISERROR(COUNTIF(INDIRECT("'"&E$4&"'!$D$5:$AC$100"),$B6)),"",COUNTIF(INDIRECT("'"&E$4&"'!$D$5:$AC$100"),$B6))

your activity code formula could be
=VLOOKUP($B6,'Activity Code Table'!$B$4:$O$14,MATCH(D$5,'Activity Code Table'!$B$3:$O$3,0),0)

T
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 36512554
To return "test" in D6 try

=INDIRECT("'Activity Code Table'!"&'Activity Code Table'!C23&COLUMN())

regards, barry
0
 

Author Closing Comment

by:garyrobbins
ID: 36512804
Imnorie - I misled you in thinking I wanted help with the formula in E6. I wanted D6. My error.

nutsch - I like how you combined Vlookup with Match and avoided my kludgy double approach using an Indirect approach.  Your solution also allows formula to be drawn down and across.

Hope you think my point assignment is fair.

Thanks for the speedy response - now I can go home.  Have a great weekend!

Gary
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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

728 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