![]() |
Can anyone help me figure this out???? PLEASE???!!!???
Kind of hard to explain so I will try to set an example:
Each time I type the word "abbey" into a cell, I would like for the next cell to populate with a monetary value I have assigned. Is this possible?? If someone could just give me a little guidance I could figure it out. Thanks! |
Can anyone help me figure this out???? PLEASE???!!!???
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1:H10" '<== change to suit On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Select Case LCase(.Value) Case "abbey": .Offset(0, 1).Value = 12 Case "manse": .Offset(0, 1).Value = 22 'etc End Select End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "SuzieinNC" wrote in message ... Kind of hard to explain so I will try to set an example: Each time I type the word "abbey" into a cell, I would like for the next cell to populate with a monetary value I have assigned. Is this possible?? If someone could just give me a little guidance I could figure it out. Thanks! |
Can anyone help me figure this out???? PLEASE???!!!???
Check VLOOKUP in help, use the cell where you type the word as lookup value
-- Regards, Peo Sjoblom "SuzieinNC" wrote in message ... Kind of hard to explain so I will try to set an example: Each time I type the word "abbey" into a cell, I would like for the next cell to populate with a monetary value I have assigned. Is this possible?? If someone could just give me a little guidance I could figure it out. Thanks! |
Can anyone help me figure this out???? PLEASE???!!!???
Hi,
Say you have a list like below: A B 1 Abbey $500 2 XXXXX $200 3 YYYYY $150 and you want when you write Abbey in a cell say C1 you can see the amount in another cell say D1 enter formula below in D1 =VLOOKUP(C1,$A$1:$B$3,2,FALSE) Thanks, -- Farhad Hodjat "SuzieinNC" wrote: Kind of hard to explain so I will try to set an example: Each time I type the word "abbey" into a cell, I would like for the next cell to populate with a monetary value I have assigned. Is this possible?? If someone could just give me a little guidance I could figure it out. Thanks! |
All times are GMT +1. The time now is 11:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com