Copying selective data

  • Thread starter Thread starter leerem
  • Start date Start date
L

leerem

I'm trying to ensure I dont undully copy empty cells. I have several hundred
Vehicals arriving per week, at present I'm allowing 1700 lines per week for
these vehicles. however over the week I may only receive 1400. When working
with a 5 week period the calculations can take forever. How can I only copy
the values of the actual entries.
My simple code:

Range("EQ10:EQ10000").Select
Selection.Copy
Range("EX10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

The caluculation can then be alligned to this:

Regards
 
Maybe

Lastrow = Cells(Rows.Count, "EQ").End(xlUp).Row
Range("EQ10:EQ" & Lastrow).Copy
Range("EX10").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
 
Sub leerem()
Set r1 = Range("EX10:EX10000")
r1.Clear
n = Cells(Rows.Count, "EQ").End(xlUp).Row
Set r1 = Range("EQ10:EQ" & n)
r1.Copy
Range("EX10").PasteSpecial Paste:=xlPasteValues
End Sub
 
Many thanks that works great

Mike H said:
Maybe

Lastrow = Cells(Rows.Count, "EQ").End(xlUp).Row
Range("EQ10:EQ" & Lastrow).Copy
Range("EX10").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top