Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enter data into a cell and dynamically update another cell
Darcy
Such a thing is usually done with a VLOOKUP formula but you said you don't want to use a formula. That leaves only a macro. Use a Worksheet_Change event macro to pick up on a change to the Data Validation cell. That macro can then search the range of your descriptions for the right one and copy it to the cell you want. Your macro would look this: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count 1 Then Exit Sub If Target = "" Then Exit Sub If Target.Address = "$C$1" Then _ Range("MyRange").Find(What:=Range("C1").Value, _ LookAt:=xlWhole).Offset(, 1).Copy Range("D1") End Sub I assumed your list is named MyRange and is in Column A starting in A1 and the descriptions are in Column B. I put the Data Validation cell in C1 and I used D1 as the cell in which to put the description. Change these as needed. HTH Otto "Darcy" wrote in message ... I've got data validation turned on for cell that has a 'list' attached to it. Once I select something from the list in the cell, I want to automatically update the cell next to it with a description. The one cell that has the list in it is an account number, and I want the account description to show up automatically right after you hit enter. I don't want to do it with a formula though. I've tried using the Worksheet_selectionchange and the Worksheet_change but haven't had any luck. Please help me out. Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto enter date when data in enter in another cell | Excel Worksheet Functions | |||
Force user to enter data in cell before moving to next cell | New Users to Excel | |||
is there a way to enter data interactively and dynamically? | Excel Discussion (Misc queries) | |||
enter data in cell but cannot save until click off cell in excel | Excel Discussion (Misc queries) | |||
How to dynamically select a validation list from data in a cell? | Excel Discussion (Misc queries) |