Setting Cell Values???

  • Thread starter Thread starter Music Junkie
  • Start date Start date
M

Music Junkie

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
 
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.
 
Back
Top