Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Drop Down & V Lookup

Still on my restaurant menu database and I can think of what I want it do but
am unsure of what the commands are in excel!
I have one dependent list which looks up the category and then returns only
the ingredients from that category. Now I would like a second dependent
lookup that looks up the category and returns only the suppliers that supply
the products in that category. Currently it keeps returning the first
dependency. Any suggestions?
Chantelle
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Drop Down & V Lookup

Hi

The easyest way:

Create a sheet Suppliers, where column headers are your categories, and in
every category column are listed suppliers for this category. P.e. from A1:
No Category1 Category2 Category3
Supplier1 Supplier1 Supplier1
Supplier2 Supplier3 Supplier2
Supplier3 Supplier4
Supplier5
, where into cell A2 you enter the formula
=IF(COUNTA($B2:$AX2)0,ROW()-1,"")

Define named range
Categories=OFFSET(Suppliers!$B$1,,,1,COUNTA(Suppli ers!$B$11:$AX$1))
(you use this named range to create your category selection drop-down,
i.e. )

Define named range
Suppliers=OFFSET(Suppliers!$A$1,1,1,MAX(Suppliers! $A:$A),COUNTA(Categories))

Activate the sheet with your main data. Let's assume the sheet has name
Data, and you have category in column A and Supplier in column B, with row
no 1 as header row. Select cell B2, and now define a named range
CatSuppl=OFFSET(Suppliers!$A$1,1,MATCH(Data!$A2,Ca tegories,0),COUNTA(INDEX(Suppliers,,MATCH(Data!$A2 ,Categories,0)),1))

Now create drop-downs for cells Data!A2 and Data!B2, using named ranges
Categories and CatSuppl respectively, and copy both cells down for as much
rows as you need.


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"Chantelle" wrote in message
...
Still on my restaurant menu database and I can think of what I want it do
but
am unsure of what the commands are in excel!
I have one dependent list which looks up the category and then returns
only
the ingredients from that category. Now I would like a second dependent
lookup that looks up the category and returns only the suppliers that
supply
the products in that category. Currently it keeps returning the first
dependency. Any suggestions?
Chantelle



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Drop Down & V Lookup

Thanks Arvi,

I have created a sheet suppliers and completed the first step, but then I am
confused by the following

a)IF formula - where does this go exactly in A2 exactly & why as this is an
example of waht my spreadsheet looks like.

Col A Col B
Col C
1 Alcohol Dairy
Dry Goods
2 Dromana Cellars Calender Cheese Fastrac
3 Imports of France Fastrac Imports
of France
4 Peninsula Dairies
The Essential Ingredient

b) The define name range is this in Insert/Name/Define and then input this
formula section? and the Suppliers!$B$1,,1,is that picking up the information
in my A1 above?
c) I am really confused with the last bit.

sorry this is my first time using dynamic drop downs so I need a bit of drop
down for dummies.

Thank you
Chantelle


















"Arvi Laanemets" wrote:

Hi

The easyest way:

Create a sheet Suppliers, where column headers are your categories, and in
every category column are listed suppliers for this category. P.e. from A1:
No Category1 Category2 Category3
Supplier1 Supplier1 Supplier1
Supplier2 Supplier3 Supplier2
Supplier3 Supplier4
Supplier5
, where into cell A2 you enter the formula
=IF(COUNTA($B2:$AX2)0,ROW()-1,"")

Define named range
Categories=OFFSET(Suppliers!$B$1,,,1,COUNTA(Suppli ers!$B$11:$AX$1))
(you use this named range to create your category selection drop-down,
i.e. )

Define named range
Suppliers=OFFSET(Suppliers!$A$1,1,1,MAX(Suppliers! $A:$A),COUNTA(Categories))

Activate the sheet with your main data. Let's assume the sheet has name
Data, and you have category in column A and Supplier in column B, with row
no 1 as header row. Select cell B2, and now define a named range
CatSuppl=OFFSET(Suppliers!$A$1,1,MATCH(Data!$A2,Ca tegories,0),COUNTA(INDEX(Suppliers,,MATCH(Data!$A2 ,Categories,0)),1))

Now create drop-downs for cells Data!A2 and Data!B2, using named ranges
Categories and CatSuppl respectively, and copy both cells down for as much
rows as you need.


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Drop Down & V Lookup

Hi


"Chantelle" wrote in message
...
Thanks Arvi,

I have created a sheet suppliers and completed the first step, but then I
am
confused by the following

a)IF formula - where does this go exactly in A2 exactly & why as this is
an
example of waht my spreadsheet looks like.


The formula goes into cell A2 on sheet Suppliers and you copy it down at
least for as much rows as max number of suppliers in any category. It
enumerates rows with at least one supplier in, so you enter only suppliers
into columns starting from column B - the column A is calculated
automatically. NB!. Categories start from column B, Column A is reserved for
a counter (in my example it has header No) - without it named range
definitions wii be much more complex.



Col A Col B
Col C
1 Alcohol Dairy
Dry Goods
2 Dromana Cellars Calender Cheese Fastrac
3 Imports of France Fastrac
Imports
of France
4 Peninsula Dairies
The Essential Ingredient

b) The define name range is this in Insert/Name/Define and then input this
formula section? and the Suppliers!$B$1,,1,is that picking up the
information
in my A1 above?


Exactly! And the named range returns the list of categories from range B1
and to right of it on sheet Suppliers.


c) I am really confused with the last bit.


Which one?



sorry this is my first time using dynamic drop downs so I need a bit of
drop
down for dummies.


No problem there at all :))




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Drop Down & V Lookup

Hi again!

I have to emphasize, that when defining the named range CatSuppl, you must
activate cell Data!B2 (really any cell in 2nd row of any sheet, but it will
be easier this way tu understand the logic). And be careful to leave row
reference in Data!$A2 relative - the named range CatSuppl is dynamic in 2
different ways, it depends on category value on same row in sheet Data, and
on number of suppliers in according Category column in Suppliers sheet.


And there was a typo in Categories named range definition. It must be
Categories=OFFSET(Suppliers!$B$1,,,1,COUNTA(Suppli ers!$B$1:$AX$1))


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )




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
Drop-down list with Lookup function? jmc784 Excel Discussion (Misc queries) 2 July 11th 08 04:43 PM
Drop down lists that auto create and then filter the next drop down list [email protected] Excel Worksheet Functions 2 September 30th 07 11:53 AM
Drop-down box lookup? femme-a-9 Excel Worksheet Functions 3 September 23rd 07 12:31 AM
Drop down menu and two dimensional lookup in Excel 2003 THE BIG O Excel Worksheet Functions 8 February 9th 06 08:37 PM
Lookup cross Drop down/scroll box ScottyM Excel Worksheet Functions 1 January 9th 06 01:19 AM


All times are GMT +1. The time now is 11:21 AM.

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"