ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data validation list box (https://www.excelbanter.com/excel-programming/416772-data-validation-list-box.html)

[email protected]

Data validation list box
 
Could I have some help on the following:-
I have a need to take the value that a user selects from a data validation
list box and use this value in a case statement to populate an adjacent cell

For example
Data validation list box is triggered in cell A1
The user can selects from Red, Green, Black
The result would then be read by a case statement.
Case Red
Cell B1 would then be filled with the value AA
Case Green
Cell B1 would then be filled with the value AB
Case Black
Cell B1 would then be filled with the value AC
Cell B1 is then populated with the corresponding value
If the list box in cell A2 was selected the result would be populated in B2
If the list box in cell A3 was selected the result would be populated in B3
And so on
The list boxes will be in column A 1 to A200 this can be added to as the
user adds more data. A201, A202 ………

IanC[_2_]

Data validation list box
 
In B1:

=IF(A1="Red","AA",IF(A1="Green","AB",IF(A1="Black" ,"AC","")))

Copy down as far as you need.

--
Ian
--
wrote in message
...
Could I have some help on the following:-
I have a need to take the value that a user selects from a data validation
list box and use this value in a case statement to populate an adjacent
cell

For example
Data validation list box is triggered in cell A1
The user can selects from Red, Green, Black
The result would then be read by a case statement.
Case Red
Cell B1 would then be filled with the value AA
Case Green
Cell B1 would then be filled with the value AB
Case Black
Cell B1 would then be filled with the value AC
Cell B1 is then populated with the corresponding value
If the list box in cell A2 was selected the result would be populated in
B2
If the list box in cell A3 was selected the result would be populated in
B3
And so on
The list boxes will be in column A 1 to A200 this can be added to as the
user adds more data. A201, A202 ...




[email protected]

Data validation list box
 
Ian

Just the job

Thank you

IanC[_2_]

Data validation list box
 
Glad to help.

Thanks for the feedback.

--
Ian
--
wrote in message
...
Ian

Just the job

Thank you





All times are GMT +1. The time now is 07:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com