Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to get cell (S5) to auto fill when you enter the weight of the
vehicle in cell (W5). If the vehicle weights 50,000 lbs or more it needs to be classified as a "HEAVY TRUCK". If the weight is less than 50,000 it needs to be classified as a "LT DUTY TRUCK". If there is no weight filled in I want to manually enter the classification. My VBA macro I pasted into the sheet is not working. Can anyone help me fix this? Thanks! Here is what I have so far Private Sub Worksheet_Change1(ByVal Target As Range) If Intersect(Range("W5"), Target) Is Nothing Then Exit Sub Application.EnableEvents = False If Target.Value = 0 Then Exit Sub End If If Target.Value = 50000 Then Range("S5").Value = "HEAVY TRUCK" End If If Target.Value < 50000 Then Range("S5").Value = "LT DUTY TRUCK" End If Application.EnableEvents = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
AutoRun Macro with a delay to give user the choice to cancel the macro | Excel Programming | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |