Hi folks,
I wrote this code which allows me to:
-- enter the DATE, then have the DESIGNATION column fill in automatically.
-- enter the CHARGE amount and have the CREDITS column fill in $0.00, giving me the option to
overwrite it if there is an actual credit to be posted.
I would like to run the "Clear_NONFOODS" macro w/o having zero's replaced everywhere,
and to be able to Right Click and Clear Contents w/o the having the same problem.
I'm wondering if there is a better way to achieve this?
Is it possible to also have DESIGNATION columns clear if the TARGET cell is cleared?
(This column will be hidden . It is used primarily for sorting when combined with other sheets on to a TOTALS page)
I’ve included a workbook for inspection.![]()
Private Sub Worksheet_Change(ByVal Target As Range) On Error Resume Next If Range("NONFOOD_DATES", "NONFOOD_CHARGES") Is Nothing Then Exit Sub On Error GoTo 0 If Not Intersect(Target, Range("NONFOOD_DATES")) Is Nothing Then Application.EnableEvents = False Target.Offset(0, 1).Value = "Amex-NonFoods" Application.EnableEvents = True End If If Not Intersect(Target, Range("NONFOOD_CHARGES")) Is Nothing Then Application.EnableEvents = False Target.Offset(0, 1).Value = "0" Application.EnableEvents = True End If End Sub
Thanks!
Bookmarks