View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
excel-chump[_2_] excel-chump[_2_] is offline
external usenet poster
 
Posts: 18
Default NEED HELP QUICK!

Thank you so much, Gordon and Peo Sjoblom! Your help has been invaluable to
me.

"Gord Dibben" wrote:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo stoppit
Application.EnableEvents = False
If Target.Address = "$H$1" And Target.Value < "Agency" _
And Target.Value < "Employee Traveler" Then
Target.Offset(1, 0).Value = ""

End If
stoppit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste into that sheet module.


Gord Dibben MS Excel MVP

On Thu, 20 Sep 2007 09:56:01 -0700, excel-chump
wrote:

I have until the end of the day (5pm est) to resolve this issue!
Now that I have your suggestion working I have a followup question:

I select "Agency" in H1 that allows input into H2
I put in "4.5", which reads as $4.50
I then change in H1 to "Permanent Resident"
H2 still displays "$4.50"

How do I get H2 to return blank when neither "Agency" or "Employee Traveler"
is chosen after the previous steps have been taken? Clearly the field can be
cleared manually, but I want to take out the human error of forgetting to go
back and change this.