ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Setting Cell Values??? (https://www.excelbanter.com/excel-programming/413304-setting-cell-values.html)

Music Junkie

Setting Cell Values???
 
I don't know if that is the correct question, buy what I am wondering is if
you can set a cells value by typing in an acronym in another cell. For
example I type in the acronym: 4man in a specific cell and the value $80.00
shows up in another specified cell. I know how to do the equations, just
hoping I can do this acronym thing to speed things up.

Hope this question makes sense, my explanation may be lacking a bit.

Any hel p is appreciated.

J

Don Guillett

Setting Cell Values???
 
Have a look in the help index for VLOOKUP.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Music Junkie" <Music
wrote in message
...
I don't know if that is the correct question, buy what I am wondering is if
you can set a cells value by typing in an acronym in another cell. For
example I type in the acronym: 4man in a specific cell and the value
$80.00
shows up in another specified cell. I know how to do the equations, just
hoping I can do this acronym thing to speed things up.

Hope this question makes sense, my explanation may be lacking a bit.

Any hel p is appreciated.

J



RyanH

Setting Cell Values???
 
You could use the Worksheet_Change Event. This event will execute any time a
single cell is changed. You will have to customize the code to your needs
though. I just put some examples in like "5girl" and "whatever". You will
also have to specify where you want then related data to be located.

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

'confirms that the Target is a single cell
If Len(Target.Address) = 4 Then

Select Case CStr(Target.Value)

Case Is = "4man"
Sheets("Sheet1").Range("B1") = "$80.00"

Case Is = "5girl"
Sheets("Sheet1").Range("B2") = "$20.00"

Case Is = "whatever"
Sheets("Sheet1").Range("B3") = "whatever"

End Select
End If

End Sub

Hope this helps! If you please click "Yes" below.
--
Cheers,
Ryan


"Music Junkie" wrote:

I don't know if that is the correct question, buy what I am wondering is if
you can set a cells value by typing in an acronym in another cell. For
example I type in the acronym: 4man in a specific cell and the value $80.00
shows up in another specified cell. I know how to do the equations, just
hoping I can do this acronym thing to speed things up.

Hope this question makes sense, my explanation may be lacking a bit.

Any hel p is appreciated.

J



All times are GMT +1. The time now is 07:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com