I have a nice macro that automatically adds a new line when "fired" based on a field name reference (Priority_Value_Case).
Here's the problem. If I have added data to the cells PRIOR to firing the macro, the macro automatically copies the range that has the added data. What I want is a new row that does not have the data I've put into the prior record / row. I think I can do this with a "clearcontents" command but don't know how for it to look at that added line only.
Here is the actual code:
'This code adds a new Case to the end of the last case.
'This adds a new case up to 12 cases
Dim rngNewCase As Range
Dim cht As ChartObject
Dim rngCurrent As Range
Dim rngDesired As Range
Application.DisplayAlerts = False
Set rngNewCase = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Offset(1)
If rngNewCase.Row > 19 Then 'To limit to A19 'comment out one of the two
'if rngnewcase.row - 6 > 10 then 'To limit to 10 rows 'comment out one of the two
MsgBox "you have exceeded the number of entries permitted"
ChartNo = rngNewCase.Row / 3
Set rngCurrent = rngNewCase.Offset(, 2)
Set rngDesired = rngNewCase.Offset(, 3)
Thank you in advance,