View Single Post
 
Old 03-22-2017, 08:57 AM
bennyamy bennyamy is offline Windows 7 64bit Office 2016
Novice
 
Join Date: Mar 2017
Posts: 3
bennyamy is on a distinguished road
Default Application Defined or Object defined error

I have the below coding and the first "ar" range copy works perfectly.
I added the "mr" & "nr" so it could paste down the blank rows below the cells are non blank, basically copy & paste down. I get the error on code line:
Code:
mr(0).Copy mr
I also attached a copy of the spreadsheet with the correct results in column C (ar)
What am I missing?
Code:
Dim rng As Range, ar As Range
Dim nr As Range
Dim mr As Range

Set rng = Columns(3).SpecialCells(xlBlanks)
For Each ar In rng.Areas
ar(0).Copy ar
Next
      
Set rng = Columns(13).SpecialCells(xlBlanks)
For Each mr In rng.Areas
mr(0).Copy mr
Next

Set rng = Columns(14).SpecialCells(xlBlanks)
For Each nr In rng.Areas
nr(0).Copy nr
Next
Attached Files
File Type: xlsm PO Invoice Upload.xlsm (40.6 KB, 13 views)
Reply With Quote