Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I picked up some code that allows me to select an item from a drop
down and it displays a corresponding value. But it replaces the drop down selection - what I want it to do is display the drop down selection in the current cell and place the corresponding value in the cell next to it. I'm terrible at VB coding and would like some help tweaking this code: Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range, res As Variant On Error GoTo ErrHandler If Target.Address = "$B$6" Then Set rng = Worksheets("Sheet2").Range("statute") res = Application.Match(Target, rng, 0) If Not IsError(res) Then Application.EnableEvents = True Target.Value = rng(res, 2) End If End If ErrHandler: Application.EnableEvents = True End Sub I'm hoping someone can answer quickly - have project due tomorrow. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cell value based on selection from drop box | Excel Worksheet Functions | |||
Can selection from text drop-down dictate value in another cell | Excel Worksheet Functions | |||
drop down list that changes cell color upon selection | Excel Discussion (Misc queries) | |||
Selection of Drop down list that allows you to go to a particular cell | Excel Worksheet Functions | |||
Drop Down List Selection... Then go to The Cell / Range | Excel Programming |