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

Jim,

Sorry, how do I do that?

"Jim F" wrote:

You need to run the code from the workbook changed event.

"ksawyers" wrote:

Thanks Jim! Unfortunately that didn't work. I have a range of cells that I
named and tried to insert in the formula but nothing happens when I enter the
value in the cell (A1) - actually I have a dropdown in the cell with options
to select. When I select the option, I want it to jump to the other cell and
if blank prompt for the new information. I'll keep trying. Thanks!

"Jim F" wrote:

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