Solved

2 Questions Involving Lookups for An Array in a different workbook

Posted on 2014-10-10
8
119 Views
Last Modified: 2014-10-10
Hello,

I am working with multiples trying to automate an end of a month progress.  And a couple questions have arisen that I can't seem to solve.

This formula works to pull the appropriate value
=VLOOKUP(VLOOKUP($A:$A,'Key to 13 Month'!$A:$B,2,FALSE),'Q:\1 - Financial Reporting\2014\08 - 2014 Experiment\PL Prelims\[13 MO Adj EBITDA.xls]Hawaii'!$A$1:$N$65536,14,FALSE)

And this formula works.
{=SUM(VLOOKUP("Storage - Hard Copy",'Q:\1 - Financial Reporting\2014\08 - 2014 Experiment\PL Prelims\[13 MO Adj EBITDA.xls]Hawaii'!$A$1:$N$65536,{7,8,9,10,11,12,13,14},FALSE))}

1)However, I can't seem to turn that second formula into a Vlookup from a hard code.  Is it possible or does it require hard coding?

2)Is there a way to turn the array into a cell reference? {7,8,9,10,11,12,13,14} I've tried with no success.
0
Comment
Question by:mattfmiller
[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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 19

Assisted Solution

by:Richard Daneke
Richard Daneke earned 125 total points
ID: 40373364
Your second formula is an array formula.   This means that an area of your worksheet is performing the calculation.  To set an array formula, one uses Control-Shift-Enter when finished entering the formula in place of the simpler Enter key.
The array in cell reference is to provide the 8 columns that you want to return across the columns where the Vlookup is set.  The array formula can be replaced with a standard vlookup, but the replacement formula will be different for each of the 8 columns where it is in place.
0
 
LVL 26

Assisted Solution

by:ProfessorJimJam
ProfessorJimJam earned 125 total points
ID: 40373366
put in a column like this for example  from A1 to A8 and then instead of

{=SUM(VLOOKUP("Storage - Hard Copy",'Q:\1 - Financial Reporting\2014\08 - 2014 Experiment\PL Prelims\[13 MO Adj EBITDA.xls]Hawaii'!$A$1:$N$65536,{7,8,9,10,11,12,13,14},FALSE))}

put {=SUM(VLOOKUP("Storage - Hard Copy",'Q:\1 - Financial Reporting\2014\08 - 2014 Experiment\PL Prelims\[13 MO Adj EBITDA.xls]Hawaii'!$A$1:$N$65536,A1:A8,FALSE))}


7
8
9
10
11
12
13
14
0
 
LVL 1

Author Comment

by:mattfmiller
ID: 40373394
The problem for the second solution, is that I have a different number of columns depending on an input.  

The array works if I have the same number of variables but breaks if I have less or more.  Is there a way can I can reference a particular cell to do that?

Thank you for your help.
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 26

Expert Comment

by:ProfessorJimJam
ID: 40373513
in that case, that may need the dynamic range.

are you familiar of creating dynamic expandable range?
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 250 total points
ID: 40373541
Since you are trying to sum up the values in columns G:N (7-14) where the value in column A is  "Storage - Hard Copy", then you need an array in that third argument to allow this to happen.  And, the formula needs to be an array formula (enter with [Ctrl]+[Shift]+[Enter], curly brackets not shown):

=SUM(VLOOKUP("Storage - Hard Copy",'Q:\1 - Financial Reporting\2014\08 - 2014 Experiment\PL Prelims\[13 MO Adj EBITDA.xls]Hawaii'!$A$1:$N$65536,Column(G:N),FALSE))

If the number/position of columns varies, then you could replace the third argument with a dynamic range name.  But we'll need more information on how that's determined.

Regards,
-Glenn
0
 
LVL 1

Author Comment

by:mattfmiller
ID: 40373578
I am not familiar with dynamic expandable ranges.

Glenn, I think your column G:N thing might be the solution I'm looking for.  Is there a way to turn that G:N into referencing a cell value?  I'm experimenting with it with no luck so far.
0
 
LVL 27

Assisted Solution

by:Glenn Ray
Glenn Ray earned 250 total points
ID: 40373606
You could use the INDIRECT function. If you had a cell with the text that specified the columns to look in, for example:
A1: "G:N"  (text value here, no quotes actually used)

you could replace the COLUMN portion in the above formula with
COLUMN(INDIRECT(A1))

and that would work the same.

So, if there is some trigger that determines the starting column and ending column, you could have that create the value in the "master cell" (A1, in this example) and the formulas would work.

My gut tells me this is not the best solution. :-/    If your criteria for the columns is numeric (say columns 7-10 in one instance, or 7-12 in another) then you could use the ROW function instead - it would be more direct.  

-Glenn
0
 
LVL 1

Author Comment

by:mattfmiller
ID: 40373629
Thank you very much.  That's exactly what I was looking for.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

688 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