View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim F Jim F is offline
external usenet poster
 
Posts: 26
Default Simple VB to Select a Cell if Another Cell Equals a Value

Sub selectAndPopulateNewCell()
If UCase(Range("A1").Value) = "X" And Range("Y1").Value = "" Then
Range("Y1").FormulaR1C1 = InputBox("Enter Value Here")
End If
End Sub

"ksawyers" wrote:

Hi!

I'm looking for simple VB code that says if Cell A1 = "X" then select cell
Y. If Cell Y is selected I want a box that pops up to prompt the user to
enter the information. Is that possible? I saw something similar, but I
can't seem to get it to work. Any help would be extremely appreciated.

Best regards,
Kerrick Sawyers