Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-07-2008, 09:01 PM
lukus2005@gmail.com
 
Posts: n/a
VLOOKUP within a NameRange.

I have a NameRange to define a price list on worksheet 2.

On worksheet 1, I have a series of pulldown menus in order to select
an item.

I have tried the following formula successfully but since the
NameRange changes depending on what item has been selected, I need to
"grab" the NameRange selected and do a VLOOKUP within that NameRange.

I know this works...
=IF($C9=" "," ",VLOOKUP($E9,Sheet2!$A$9:$B$174,2,0))

But, I want the part "Sheet2!$A$9:$B$174" to take on the name of the
range based on what option is selected in the pulldown menu.

So if in the pulldown menu in D9 I select "Pipes", and then I select
"2 x 1" in the pulldown menu located in E9, I want my formula to look
for "2 x 1" within the NameRange for "Pipes" and pull the price for
that item found in the next column. Should I select "Ducts" instead
of "Pipes", it needs to look within the NameRange I defined for
"Ducts".

I tried unsuccessfully this...
=IF($C9=" "," ",VLOOKUP($E9,INDIRECT(C9),2,0)) where C9 returns the
NameRange.


TIA

Reply With Quote
  #2 (permalink)  
Old 07-07-2008, 09:19 PM
T. Valko
 
Posts: n/a
Re: VLOOKUP within a NameRange.

>I tried unsuccessfully this...
>=IF($C9=" "," ",VLOOKUP($E9,INDIRECT(C9),2,0))
>where C9 returns the NameRange.


What does unsuccessfully mean? Did you get an error?

Are your named ranges dynamic ranges?


--
Biff
Microsoft Excel MVP


<lukus2005@gmail.com> wrote in message
news:28b09c83-d3d1-4f96-a6be-af34910a3da6@s50g2000hsb.googlegroups.com...
>I have a NameRange to define a price list on worksheet 2.
>
> On worksheet 1, I have a series of pulldown menus in order to select
> an item.
>
> I have tried the following formula successfully but since the
> NameRange changes depending on what item has been selected, I need to
> "grab" the NameRange selected and do a VLOOKUP within that NameRange.
>
> I know this works...
> =IF($C9=" "," ",VLOOKUP($E9,Sheet2!$A$9:$B$174,2,0))
>
> But, I want the part "Sheet2!$A$9:$B$174" to take on the name of the
> range based on what option is selected in the pulldown menu.
>
> So if in the pulldown menu in D9 I select "Pipes", and then I select
> "2 x 1" in the pulldown menu located in E9, I want my formula to look
> for "2 x 1" within the NameRange for "Pipes" and pull the price for
> that item found in the next column. Should I select "Ducts" instead
> of "Pipes", it needs to look within the NameRange I defined for
> "Ducts".
>
> I tried unsuccessfully this...
> =IF($C9=" "," ",VLOOKUP($E9,INDIRECT(C9),2,0)) where C9 returns the
> NameRange.
>
>
> TIA
>



Reply With Quote
  #3 (permalink)  
Old 07-07-2008, 09:20 PM
Niek Otten
 
Posts: n/a
Re: VLOOKUP within a NameRange.

<where C9 returns the NameRange>

So what is in C9? And if it is a name, how is it defined?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

<lukus2005@gmail.com> wrote in message news:28b09c83-d3d1-4f96-a6be-af34910a3da6@s50g2000hsb.googlegroups.com...
|I have a NameRange to define a price list on worksheet 2.
|
| On worksheet 1, I have a series of pulldown menus in order to select
| an item.
|
| I have tried the following formula successfully but since the
| NameRange changes depending on what item has been selected, I need to
| "grab" the NameRange selected and do a VLOOKUP within that NameRange.
|
| I know this works...
| =IF($C9=" "," ",VLOOKUP($E9,Sheet2!$A$9:$B$174,2,0))
|
| But, I want the part "Sheet2!$A$9:$B$174" to take on the name of the
| range based on what option is selected in the pulldown menu.
|
| So if in the pulldown menu in D9 I select "Pipes", and then I select
| "2 x 1" in the pulldown menu located in E9, I want my formula to look
| for "2 x 1" within the NameRange for "Pipes" and pull the price for
| that item found in the next column. Should I select "Ducts" instead
| of "Pipes", it needs to look within the NameRange I defined for
| "Ducts".
|
| I tried unsuccessfully this...
| =IF($C9=" "," ",VLOOKUP($E9,INDIRECT(C9),2,0)) where C9 returns the
| NameRange.
|
|
| TIA
|


Reply With Quote
  #4 (permalink)  
Old 07-07-2008, 10:43 PM
Don Guillett
 
Posts: n/a
Re: VLOOKUP within a NameRange.

I just tested this where c16 was a named vlookup range specified by the data
validation drop down and d16 was the value to lookup also selected by a data
validation drop down. You may have a problem with the list and the value to
look up not being the same 2x1 or quotes or trim.

=VLOOKUP(D16,INDIRECT(C16),2)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
<lukus2005@gmail.com> wrote in message
news:28b09c83-d3d1-4f96-a6be-af34910a3da6@s50g2000hsb.googlegroups.com...
>I have a NameRange to define a price list on worksheet 2.
>
> On worksheet 1, I have a series of pulldown menus in order to select
> an item.
>
> I have tried the following formula successfully but since the
> NameRange changes depending on what item has been selected, I need to
> "grab" the NameRange selected and do a VLOOKUP within that NameRange.
>
> I know this works...
> =IF($C9=" "," ",VLOOKUP($E9,Sheet2!$A$9:$B$174,2,0))
>
> But, I want the part "Sheet2!$A$9:$B$174" to take on the name of the
> range based on what option is selected in the pulldown menu.
>
> So if in the pulldown menu in D9 I select "Pipes", and then I select
> "2 x 1" in the pulldown menu located in E9, I want my formula to look
> for "2 x 1" within the NameRange for "Pipes" and pull the price for
> that item found in the next column. Should I select "Ducts" instead
> of "Pipes", it needs to look within the NameRange I defined for
> "Ducts".
>
> I tried unsuccessfully this...
> =IF($C9=" "," ",VLOOKUP($E9,INDIRECT(C9),2,0)) where C9 returns the
> NameRange.
>
>
> TIA
>


Reply With Quote
  #5 (permalink)  
Old 07-07-2008, 11:35 PM
jaf
 
Posts: n/a
Re: VLOOKUP within a NameRange. (screen shot) clip_image002.jpg [1/2]

Reply With Quote
  #6 (permalink)  
Old 07-07-2008, 11:35 PM
jaf
 
Posts: n/a
Re: VLOOKUP within a NameRange. (screen shot) clip_image002.jpg [2/2]

Reply With Quote
  #7 (permalink)  
Old 07-08-2008, 01:31 PM
lukus2005@gmail.com
 
Posts: n/a
Re: VLOOKUP within a NameRange.

- A9 is a pulldown menu showing different categories of material, for
example: Pipes, Ducts, Jacketing, etc...
- A9 is a Data Validation List defined as follow: =Categories (where
Categories is a NameRange).

- C9 is another pulldown menu showing sub options specific to what was
selected in A9, for example: If Pipes is selected in A9, then C9 will
show these options... Fiberglass, Mineral Fiber, etc...
- C9 is a Data Validation List defined as follow:
=INDIRECT(VLOOKUP(A9,NameLookup,2,0)) (where NameLookup is a 2-column
NameRange so I can remove spaced in my pulldown menu options).

- E9 is the last pulldown menu that allows you to select the size (or
specific item) based on what was selected in C9, for example: 1"x1",
2"x1", etc...
- E9 is a Data Validation List defined as follow: =INDIRECT(C9)

- G9 should show the unit price associated with the item selected in
E9.
- I tried doing this by using the following formula: =IF($C9=" ","
",VLOOKUP($E9,INDIRECT(C9),2,0)) but that produces a #REF! error.
- If I bypass the INDIRECT(C9) function in my formula and hard code
it, it works, for example: =IF($C9=" "," ",VLOOKUP($E9,Piping!$A$9:$B
$174,2,0))

I have created a NameRange for every menu options and price lists.
The price lists contain 2 columns, one for the item name and one for
the unit price. There's a worksheet for ever menu options found in the
A9 pulldown which contains all the price lists for material associated
with that category. But the price list is broken down into sub-
categories (as displayed in C9 pulldown menu).

I hope this details example isn't more confusing than my previous
one. I'm almost there, just need to get that price (G9) to show up.
Thanks once again!


On Jul 7, 4:20 pm, "Niek Otten" <nicol...@xs4all.nl> wrote:
> <where C9 returns the NameRange>
>
> So what is in C9? And if it is a name, how is it defined?
>
> --
> Kind regards,
>
> Niek Otten
> Microsoft MVP - Excel
>
> <lukus2...@gmail.com> wrote in messagenews:28b09c83-d3d1-4f96-a6be-af34910a3da6@s50g2000hsb.googlegroups.com...
>
> |I have a NameRange to define a price list on worksheet 2.
> |
> | On worksheet 1, I have a series of pulldown menus in order to select
> | an item.
> |
> | I have tried the following formula successfully but since the
> | NameRange changes depending on what item has been selected, I need to
> | "grab" the NameRange selected and do a VLOOKUP within that NameRange.
> |
> | I know this works...
> | =IF($C9=" "," ",VLOOKUP($E9,Sheet2!$A$9:$B$174,2,0))
> |
> | But, I want the part "Sheet2!$A$9:$B$174" to take on the name of the
> | range based on what option is selected in the pulldown menu.
> |
> | So if in the pulldown menu in D9 I select "Pipes", and then I select
> | "2 x 1" in the pulldown menu located in E9, I want my formula to look
> | for "2 x 1" within the NameRange for "Pipes" and pull the price for
> | that item found in the next column. Should I select "Ducts" instead
> | of "Pipes", it needs to look within the NameRange I defined for
> | "Ducts".
> |
> | I tried unsuccessfully this...
> | =IF($C9=" "," ",VLOOKUP($E9,INDIRECT(C9),2,0)) where C9 returns the
> | NameRange.
> |
> |
> | TIA
> |


Reply With Quote
  #8 (permalink)  
Old 07-08-2008, 01:34 PM
lukus2005@gmail.com
 
Posts: n/a
Re: VLOOKUP within a NameRange.

- A9 is a pulldown menu showing different categories of material, for
example: Pipes, Ducts, Jacketing, etc...
- A9 is a Data Validation List defined as follow: =Categories (where
Categories is a NameRange).

- C9 is another pulldown menu showing sub options specific to what was
selected in A9, for example: If Pipes is selected in A9, then C9 will
show these options... Fiberglass, Mineral Fiber, etc...
- C9 is a Data Validation List defined as follow:
=INDIRECT(VLOOKUP(A9,NameLookup,2,0)) (where NameLookup is a 2-column
NameRange so I can remove spaced in my pulldown menu options).

- E9 is the last pulldown menu that allows you to select the size (or
specific item) based on what was selected in C9, for example: 1"x1",
2"x1", etc...
- E9 is a Data Validation List defined as follow: =INDIRECT(C9)

- G9 should show the unit price associated with the item selected in
E9.
- I tried doing this by using the following formula: =IF($C9=" ","
",VLOOKUP($E9,INDIRECT(C9),2,0)) but that produces a #REF! error.
- If I bypass the INDIRECT(C9) function in my formula and hard code
it, it works, for example: =IF($C9=" "," ",VLOOKUP($E9,Piping!$A$9:$B
$174,2,0))

I have created a NameRange for every menu options and price lists.
The price lists contain 2 columns, one for the item name and one for
the unit price. There's a worksheet for ever menu options found in the
A9 pulldown which contains all the price lists for material associated
with that category. But the price list is broken down into sub-
categories (as displayed in C9 pulldown menu).

I hope this details example isn't more confusing than my previous
one. I'm almost there, just need to get that price (G9) to show up.
Thanks once again!

On Jul 7, 4:20 pm, "Niek Otten" <nicol...@xs4all.nl> wrote:
> <where C9 returns the NameRange>
>
> So what is in C9? And if it is a name, how is it defined?
>
> --
> Kind regards,
>
> Niek Otten
> Microsoft MVP - Excel
>
> <lukus2...@gmail.com> wrote in messagenews:28b09c83-d3d1-4f96-a6be-af34910a3da6@s50g2000hsb.googlegroups.com...
>
> |I have a NameRange to define a price list on worksheet 2.
> |
> | On worksheet 1, I have a series of pulldown menus in order to select
> | an item.
> |
> | I have tried the following formula successfully but since the
> | NameRange changes depending on what item has been selected, I need to
> | "grab" the NameRange selected and do a VLOOKUP within that NameRange.
> |
> | I know this works...
> | =IF($C9=" "," ",VLOOKUP($E9,Sheet2!$A$9:$B$174,2,0))
> |
> | But, I want the part "Sheet2!$A$9:$B$174" to take on the name of the
> | range based on what option is selected in the pulldown menu.
> |
> | So if in the pulldown menu in D9 I select "Pipes", and then I select
> | "2 x 1" in the pulldown menu located in E9, I want my formula to look
> | for "2 x 1" within the NameRange for "Pipes" and pull the price for
> | that item found in the next column. Should I select "Ducts" instead
> | of "Pipes", it needs to look within the NameRange I defined for
> | "Ducts".
> |
> | I tried unsuccessfully this...
> | =IF($C9=" "," ",VLOOKUP($E9,INDIRECT(C9),2,0)) where C9 returns the
> | NameRange.
> |
> |
> | TIA
> |


Reply With Quote
  #9 (permalink)  
Old 07-08-2008, 02:43 PM
Dave Peterson
 
Posts: n/a
Re: VLOOKUP within a NameRange.

Try not checking for spaces:

=IF($C9=" "," ",VLOOKUP($E9,INDIRECT(C9),2,0))
could be:
=IF($C9="","",VLOOKUP($E9,INDIRECT(C9),2,0))



"lukus2005@gmail.com" wrote:
>
> - A9 is a pulldown menu showing different categories of material, for
> example: Pipes, Ducts, Jacketing, etc...
> - A9 is a Data Validation List defined as follow: =Categories (where
> Categories is a NameRange).
>
> - C9 is another pulldown menu showing sub options specific to what was
> selected in A9, for example: If Pipes is selected in A9, then C9 will
> show these options... Fiberglass, Mineral Fiber, etc...
> - C9 is a Data Validation List defined as follow:
> =INDIRECT(VLOOKUP(A9,NameLookup,2,0)) (where NameLookup is a 2-column
> NameRange so I can remove spaced in my pulldown menu options).
>
> - E9 is the last pulldown menu that allows you to select the size (or
> specific item) based on what was selected in C9, for example: 1"x1",
> 2"x1", etc...
> - E9 is a Data Validation List defined as follow: =INDIRECT(C9)
>
> - G9 should show the unit price associated with the item selected in
> E9.
> - I tried doing this by using the following formula: =IF($C9=" ","
> ",VLOOKUP($E9,INDIRECT(C9),2,0)) but that produces a #REF! error.
> - If I bypass the INDIRECT(C9) function in my formula and hard code
> it, it works, for example: =IF($C9=" "," ",VLOOKUP($E9,Piping!$A$9:$B
> $174,2,0))
>
> I have created a NameRange for every menu options and price lists.
> The price lists contain 2 columns, one for the item name and one for
> the unit price. There's a worksheet for ever menu options found in the
> A9 pulldown which contains all the price lists for material associated
> with that category. But the price list is broken down into sub-
> categories (as displayed in C9 pulldown menu).
>
> I hope this details example isn't more confusing than my previous
> one. I'm almost there, just need to get that price (G9) to show up.
> Thanks once again!
>
> On Jul 7, 4:20 pm, "Niek Otten" <nicol...@xs4all.nl> wrote:
> > <where C9 returns the NameRange>
> >
> > So what is in C9? And if it is a name, how is it defined?
> >
> > --
> > Kind regards,
> >
> > Niek Otten
> > Microsoft MVP - Excel
> >
> > <lukus2...@gmail.com> wrote in messagenews:28b09c83-d3d1-4f96-a6be-af34910a3da6@s50g2000hsb.googlegroups.com...
> >
> > |I have a NameRange to define a price list on worksheet 2.
> > |
> > | On worksheet 1, I have a series of pulldown menus in order to select
> > | an item.
> > |
> > | I have tried the following formula successfully but since the
> > | NameRange changes depending on what item has been selected, I need to
> > | "grab" the NameRange selected and do a VLOOKUP within that NameRange.
> > |
> > | I know this works...
> > | =IF($C9=" "," ",VLOOKUP($E9,Sheet2!$A$9:$B$174,2,0))
> > |
> > | But, I want the part "Sheet2!$A$9:$B$174" to take on the name of the
> > | range based on what option is selected in the pulldown menu.
> > |
> > | So if in the pulldown menu in D9 I select "Pipes", and then I select
> > | "2 x 1" in the pulldown menu located in E9, I want my formula to look
> > | for "2 x 1" within the NameRange for "Pipes" and pull the price for
> > | that item found in the next column. Should I select "Ducts" instead
> > | of "Pipes", it needs to look within the NameRange I defined for
> > | "Ducts".
> > |
> > | I tried unsuccessfully this...
> > | =IF($C9=" "," ",VLOOKUP($E9,INDIRECT(C9),2,0)) where C9 returns the
> > | NameRange.
> > |
> > |
> > | TIA
> > |


--

Dave Peterson
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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



All times are GMT. The time now is 02:05 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Debt Help | Online Advertising | Credit Card | Fast Loans | Credit Card



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114