Hello,
I've written a macro to import data from 22 Access database queries into 22 excel 'Data' worksheets. From there, a macro was written to create a bunch of pivot tables for each of the data worksheet. Everything works fine until I only have one row of data in my 'Data' workseet because a code was written that if I didn't have any data in column J, the cells would say 'PO not found'. Below is an example of the code for one of the data worksheets:
On Error Resume Next
Range("J2:J" & FinalRow).SpecialCells(xlCellTypeBlanks) = "PO not found"
Sheets("DATA Worksheet1").Activate
FinalRow = Range("A65536").End(xlUp).Ro
I believe the problem happens if I only have one line of data because the macro is going from rows J3 to J65536 and just filling it up with 'PO not found'! Anyone has any suggestions to rectify this problem?
Thank you very much in advance!!
I've written a macro to import data from 22 Access database queries into 22 excel 'Data' worksheets. From there, a macro was written to create a bunch of pivot tables for each of the data worksheet. Everything works fine until I only have one row of data in my 'Data' workseet because a code was written that if I didn't have any data in column J, the cells would say 'PO not found'. Below is an example of the code for one of the data worksheets:
On Error Resume Next
Range("J2:J" & FinalRow).SpecialCells(xlCellTypeBlanks) = "PO not found"
Sheets("DATA Worksheet1").Activate
FinalRow = Range("A65536").End(xlUp).Ro
I believe the problem happens if I only have one line of data because the macro is going from rows J3 to J65536 and just filling it up with 'PO not found'! Anyone has any suggestions to rectify this problem?
Thank you very much in advance!!