C
Celt
TIA
I have a macro that searches a "data dump" from my general ledger and
basically organizes it for review. I am trying to trap an error when
my macro encounters a range that does not exist. This is my code:
-code for the range (for which there is no data):-
ActiveWorkbook.Names.Add Name:="SVC", RefersToR1C1:= _
"=OFFSET(INDIRECT(ADDRESS(MATCH(40510,ALL!C5,0),5)),0,-4,COUNTIF(ALL!C5,40510),COUNTA(ALL!R4))"
-this is the error trap I am using:-
On Error GoTo skipSVC
Sheets("ALL").Select
Range("SVC").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Contrib Svc").Select
Range("A4").Select
ActiveSheet.Paste
skipSVC:
I was thinking that when the macro encountered a range for which there
was no data, it would just skip over this section.
I have quite a few of these in my macro (the others happen to have data
present)...
Can anyone shed a little light on my mistake and point me in the right
direction?
Thanks any help offered!!!!
I have a macro that searches a "data dump" from my general ledger and
basically organizes it for review. I am trying to trap an error when
my macro encounters a range that does not exist. This is my code:
-code for the range (for which there is no data):-
ActiveWorkbook.Names.Add Name:="SVC", RefersToR1C1:= _
"=OFFSET(INDIRECT(ADDRESS(MATCH(40510,ALL!C5,0),5)),0,-4,COUNTIF(ALL!C5,40510),COUNTA(ALL!R4))"
-this is the error trap I am using:-
On Error GoTo skipSVC
Sheets("ALL").Select
Range("SVC").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Contrib Svc").Select
Range("A4").Select
ActiveSheet.Paste
skipSVC:
I was thinking that when the macro encountered a range for which there
was no data, it would just skip over this section.
I have quite a few of these in my macro (the others happen to have data
present)...
Can anyone shed a little light on my mistake and point me in the right
direction?
Thanks any help offered!!!!