Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Help with dynamic array lookup based on a single reference cell ..

Hello,

I'm trying to find a way to reference one of multiple arrays from a single
reference cell for a VLOOKUP. For example, the formula I'm using is:

=IF(E198<"",IF(ISERROR(VLOOKUP(E198,$A$4:$C$191,2 ,FALSE)),"X",VLOOKUP(E198,$A$4:$C$191,2,FALSE)),"" )

Rather than use the fixed range $A$4:$C$191, I'd like to give it a name and
be able to tell all cells that call this function to change their lookup
based on a single cell.

For example, I have 3 arrays: Apple, Banana, Citrus. I would like to create
a data validated cell with those three selections and then have all the
VLOOKUPs reference the named range specified by those data.

So, if the data validated cell is A1, I would expect my formula to resemble
=IF(E198<"",IF(ISERROR(VLOOKUP(E198,A1,2,FALSE)), "X",VLOOKUP(E198,A1,2,FALSE)),"")
.... but this doesn't work because excel doesn't recognize "Banana" in A1 as
the named range Banana.

Is there any way to perform this more dynamic formula building?

A second question, if I might. I'm referencing data on another sheet via
=COUNTIF('Resource Requests'!B$3:B$100,$B3). I don't have Excel 2007
available on this computer so I can't use the COUNTIFS function. The problem
is that I only want to count those entries for rows that don't include value
"X" in an adjacent column. What suggestions do you have?

Many thanks,
Steve
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Help with dynamic array lookup based on a single reference cell ..

1. Setup a named range that is based off of your validated cell.
(Insert-name-Define) Define the range possibly as
=LOOKUP(A1,{"Apple","Banana","Citrus"},{B1:B10,C1: C10,D1:D10})

Then in you cell's formula, instead of referring to A1, refer to the named
range.

2. SUMPRODUCT can do anything SUMIFS and COUNTIFS can do in 2007. I believe
=SUMPRODUCT(('Resource Requests'!B$3:B$100=$B3)*('Resource
Requests'!C$3:C$100<"X"))

is close to what you're looking for.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"SPStevo" wrote:

Hello,

I'm trying to find a way to reference one of multiple arrays from a single
reference cell for a VLOOKUP. For example, the formula I'm using is:

=IF(E198<"",IF(ISERROR(VLOOKUP(E198,$A$4:$C$191,2 ,FALSE)),"X",VLOOKUP(E198,$A$4:$C$191,2,FALSE)),"" )

Rather than use the fixed range $A$4:$C$191, I'd like to give it a name and
be able to tell all cells that call this function to change their lookup
based on a single cell.

For example, I have 3 arrays: Apple, Banana, Citrus. I would like to create
a data validated cell with those three selections and then have all the
VLOOKUPs reference the named range specified by those data.

So, if the data validated cell is A1, I would expect my formula to resemble
=IF(E198<"",IF(ISERROR(VLOOKUP(E198,A1,2,FALSE)), "X",VLOOKUP(E198,A1,2,FALSE)),"")
... but this doesn't work because excel doesn't recognize "Banana" in A1 as
the named range Banana.

Is there any way to perform this more dynamic formula building?

A second question, if I might. I'm referencing data on another sheet via
=COUNTIF('Resource Requests'!B$3:B$100,$B3). I don't have Excel 2007
available on this computer so I can't use the COUNTIFS function. The problem
is that I only want to count those entries for rows that don't include value
"X" in an adjacent column. What suggestions do you have?

Many thanks,
Steve

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help with dynamic array lookup based on a single reference cell ..

Try these:

Q1:

VLOOKUP(E198,INDIRECT(A1),2,0)

Q2:

=SUMPRODUCT(--('Resource Requests'!B$3:B$100=$B3),--('Resource
Requests'!C$3:C$100<"X"))

--
Biff
Microsoft Excel MVP


"SPStevo" wrote in message
...
Hello,

I'm trying to find a way to reference one of multiple arrays from a single
reference cell for a VLOOKUP. For example, the formula I'm using is:

=IF(E198<"",IF(ISERROR(VLOOKUP(E198,$A$4:$C$191,2 ,FALSE)),"X",VLOOKUP(E198,$A$4:$C$191,2,FALSE)),"" )

Rather than use the fixed range $A$4:$C$191, I'd like to give it a name
and
be able to tell all cells that call this function to change their lookup
based on a single cell.

For example, I have 3 arrays: Apple, Banana, Citrus. I would like to
create
a data validated cell with those three selections and then have all the
VLOOKUPs reference the named range specified by those data.

So, if the data validated cell is A1, I would expect my formula to
resemble
=IF(E198<"",IF(ISERROR(VLOOKUP(E198,A1,2,FALSE)), "X",VLOOKUP(E198,A1,2,FALSE)),"")
... but this doesn't work because excel doesn't recognize "Banana" in A1
as
the named range Banana.

Is there any way to perform this more dynamic formula building?

A second question, if I might. I'm referencing data on another sheet via
=COUNTIF('Resource Requests'!B$3:B$100,$B3). I don't have Excel 2007
available on this computer so I can't use the COUNTIFS function. The
problem
is that I only want to count those entries for rows that don't include
value
"X" in an adjacent column. What suggestions do you have?

Many thanks,
Steve



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup formula with dynamic sheet reference William Blake Excel Worksheet Functions 5 August 14th 08 12:23 AM
Lookup tab based on cell reference Sean Timmons Excel Discussion (Misc queries) 3 January 6th 07 02:02 AM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
Fixing a single cell reference keeping others dynamic Engineering Intern Excel Worksheet Functions 1 July 1st 05 07:09 PM


All times are GMT +1. The time now is 10:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"