Hi,
I need to copy only the rows in a range that have data in them. For a basic explination, with overtime calcs if someone is part time say 20/35 and they do 20 hours overtime.
The first 15 hours are paid at time and get one GL Code
The other 5 are time and a half and get a different code.
On my input sheet this is all calculated and only fills in the relevant line in the table (essentially there are about 12 overtime types)
The way the form worked originally was that it copied the data from the single input line to the output tab, this one now copies from the new table I've created to the output tab and works fine...
However it copies the whole range of the table "I6:P18" and includes blank lines on the output table. How can I get it so it only copies lines out of that range that aren't blank?
This is the current copy code I am using:
Private Sub CommandButton2_Click()
Dim NR As Long
Dim InS As Worksheet
Dim OuS As Worksheet
Set InS = Sheets("INPUT LIST")
Set OuS = Sheets("OUTPUT LIST")
NR = OuS.Range("A" & Rows.Count).End(xlUp).Row + 1
InS.Range("I6:P18").Copy
OuS.Range("A" & NR).PasteSpecial xlPasteValues
Range("Emp,Manual,Role,OHrs,SHrs,Casual,CRate,AddType,AddHrs,FDate,TDate").Value = ""
End Sub
Bookmarks