Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data Validation is it proper to use it in this situation
Hello
Im a beginner to VBA in excel and this is probably the wrong way to go about it... But I want to have a list of companies in a column. When the user selects a company that will create a column with the "attention name" with respect to the company. Then have both company and attetnion appear in another column. I have done this with excels data validation for the companies name but am having problems with the attention part. Ive been trying with the apollo part only using select case Any suggestions is appreciated Lisa Select Case Cells(5, "c") Case "Apollo" Cells(2, "A") = "APOLLO " 'Cells(9, "h") = "Attention smith" 'Cells(10, "h") = "Attention john" With Selection.Validation .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=$H$9:$H$10" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With Cells(3, "a") = Cells(5, "e") Case "brooks" Cells(2, "a") = "Brooks ltd" Case "peterson" Cells(2, "a") = "peterson ltd" Case Else Cells(2, "B") = "" End Select |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
custom data validation on cells with data validation values | Excel Worksheet Functions | |||
Difficulty Aligning Series Data With Proper Dates | Charts and Charting in Excel | |||
"Tricky Situation" - Validation Formula | Excel Discussion (Misc queries) | |||
Convert data into proper time format | Excel Worksheet Functions | |||
validation rule - force text entries to appear as Proper | Excel Worksheet Functions |