Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default VLOOKUP or dropdown in the cell depending on selection in another

Can anyone suggest a way of doing this. I want to be able to allocate
resources and/or roles.

I have a number of staff members each with a specific role. I have a
dropdown list in the cell so the user can select the relevant staff member.
A VLOOKUP then selects the selected staff members role using named ranges and
a separate spreadsheet. If there is not specific staff member available I
want the user to be able to select a staff member of "To Recruit" and then be
able to select a role type from a dropdown list. My list of staff names
contains around 100 people and there are over 30 possible roles which is why
I have used named ranges
e.g.
Mr A is a BA
Mr B is a Programmer
Mr C is a Tester
The possible available types of roles I have is BA, Programmer, Tester and
Manager.

The dropdown in cell A1 contains Mr A, Mr B, Mr C, & To Recruit

If user selects Mr A in A1 then BA shows in cell B1
If user selects Mr B then Programmer shows in cell B1
If user selects To Recruit in A1 then a dropdown list containing BA,
Programmer, Tester, Manager shows in B1 and the user must select one from it.

So my spreadsheet could show
A B
1 Mr C Tester (auto populated)
2 To Recruit Tester (selected via dropdown)
3 To Recruit BA (selected via dropdown)
4 Mr B Programmer (auto populated)

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default VLOOKUP or dropdown in the cell depending on selection in another

Debra Dalgleish has some good information (and code) on setting up dependents
lists he http://www.contextures.com/xlDataVal02.html

That may head you toward a solution.

The problem with what you're asking for is that you want the VLOOKUP() to
come up with entries based on the name selected AND you want the option to
use a data validation list. One interferes with the other. You can actually
set up the VLOOKUP() formula and then add data validation to the same cell,
but the pretty much the first time you actually do anything with it all, the
VLOOKUP() gets wiped out and you're left with data validation only - and if
the results of the VLOOKUP() aren't also in your Data Validation list, you
get an 'invalid' error as a no-cost extra.

Unless you find something at Contextures.com, I'm thinking the solution will
involve some VBA coding associated with the worksheet's _SelectionChange
event that will do one of two things when you enter/choose something in the
Column A cell: do the equivalent of a VLOOKUP() and if it finds a match, put
that in the appropriate cell in column B, but if you've entered/chosen To
Recruit (which really should be in your validation list for column A - that
'invalid selection' thing, remember?) then it would set up data validation in
the column B cell so you can pick from that list.

"Spottydog" wrote:

Can anyone suggest a way of doing this. I want to be able to allocate
resources and/or roles.

I have a number of staff members each with a specific role. I have a
dropdown list in the cell so the user can select the relevant staff member.
A VLOOKUP then selects the selected staff members role using named ranges and
a separate spreadsheet. If there is not specific staff member available I
want the user to be able to select a staff member of "To Recruit" and then be
able to select a role type from a dropdown list. My list of staff names
contains around 100 people and there are over 30 possible roles which is why
I have used named ranges
e.g.
Mr A is a BA
Mr B is a Programmer
Mr C is a Tester
The possible available types of roles I have is BA, Programmer, Tester and
Manager.

The dropdown in cell A1 contains Mr A, Mr B, Mr C, & To Recruit

If user selects Mr A in A1 then BA shows in cell B1
If user selects Mr B then Programmer shows in cell B1
If user selects To Recruit in A1 then a dropdown list containing BA,
Programmer, Tester, Manager shows in B1 and the user must select one from it.

So my spreadsheet could show
A B
1 Mr C Tester (auto populated)
2 To Recruit Tester (selected via dropdown)
3 To Recruit BA (selected via dropdown)
4 Mr B Programmer (auto populated)

Thanks

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
How do I. VLOOKUP & BRING BACK THE CELL BELOW THE CELL WHICH IS FO Chris Excel Worksheet Functions 2 November 16th 06 02:42 AM
Cell References [email protected] Excel Discussion (Misc queries) 2 November 15th 06 11:37 PM
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
Vlookup for data contained in a cell Garbunkel Excel Worksheet Functions 5 September 14th 05 06:47 PM
Cell Selection after "Enter" Synectica Excel Discussion (Misc queries) 6 August 29th 05 09:55 PM


All times are GMT +1. The time now is 01:25 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"