Solved

2 Questions Involving Lookups for An Array in a different workbook

Posted on 2014-10-10
8
104 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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 18

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 25

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
 
LVL 25

Expert Comment

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

are you familiar of creating dynamic expandable range?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
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 …
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…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now