This macro will accomplish your requirments:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
Application.EnableEvents = False
On Error GoTo ErrorExit
For Each cell In Intersect(Target, Range("A:A"))
Select Case UCase(cell.Value)
Case "TEXT"
With cell.Offset(, 1)
.Value = ""
.NumberFormat = "@"
With .Validation
.Delete
.Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Formula1:="=ISTEXT(B" & cell.Row & ")"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "This cell must contain a text entry"
.ShowInput = True
.ShowError = True
End With
End With
Case "NUMBER"
With cell.Offset(, 1)
.Value = ""
.NumberFormat = "0.#"
With .Validation
.Delete
.Add Type:=xlValidateDecimal, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="0", Formula2:="32.99999999999"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "This cell must contain a number between 0 and 32.999999999"
.ShowInput = True
.ShowError = True
End With
End With
Case "PERCENTAGE"
With cell.Offset(, 1)
.Value = ""
.Style = "Percent"
With .Validation
.Delete
.Add Type:=xlValidateDecimal, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=".1", Formula2:=".9"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "This value must be a percentage 10%-90%"
.ShowInput = True
.ShowError = True
End With
End With
Case "LONG"
With cell.Offset(, 1)
.Value = ""
.NumberFormat = "@"
With .Validation
.Delete
.Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="1", Formula2:="150"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "This message is limited to 150 characters"
.ShowInput = True
.ShowError = True
End With
End With
End Select
Next cell
ErrorExit:
Application.EnableEvents = True
End Sub
To add to your workbook:
1. Open up your workbook
2. Right-click the sheet tab and select VIEW CODE
3. Copy and Paste in your code (given above)
4. Get out of VBA (Press Alt+Q)
5. Save as a macro-enabled workbook
The macro is installed and ready to use. It operates on its own. As you make drop down changes in column A, it will apply custom DV settings to column B on that row to match your choice.
Bookmarks