J
jfcby
Hello,
Sheet3 has data input Dates - B8:B15, Description - D815, & Type -
E8:E16 I need the script to loop through these cells if there is data
in them to insert that data in Sheet2 next blank row.
The macro below will insert data for B8, D8, & E8 but will not for the
other cells that have data. So how can this macro be modified to loop
through Sheet3 cells B8:B15, D815, & E8:E16 and insert the data in
Sheet2 next blank rows?
Sub FindBlankRowInsertData()
Dim lastrow As Object
Dim currentWorkbook As Workbook
Dim WS As Worksheet
With currentWorkbook
Set lastrow = Sheet2.Range("a65536").End(xlUp)
Set WS = Sheet3
'write the data to the new sheets
lastrow.Offset(1, 0) = WS.Range("D815").Value
lastrow.Offset(1, 1) = WS.Range("B8:B15").Value
lastrow.Offset(1, 2) = WS.Range("E8:E15").Value
End With
End Sub
Thank you for your help,
jfcby
Sheet3 has data input Dates - B8:B15, Description - D815, & Type -
E8:E16 I need the script to loop through these cells if there is data
in them to insert that data in Sheet2 next blank row.
The macro below will insert data for B8, D8, & E8 but will not for the
other cells that have data. So how can this macro be modified to loop
through Sheet3 cells B8:B15, D815, & E8:E16 and insert the data in
Sheet2 next blank rows?
Sub FindBlankRowInsertData()
Dim lastrow As Object
Dim currentWorkbook As Workbook
Dim WS As Worksheet
With currentWorkbook
Set lastrow = Sheet2.Range("a65536").End(xlUp)
Set WS = Sheet3
'write the data to the new sheets
lastrow.Offset(1, 0) = WS.Range("D815").Value
lastrow.Offset(1, 1) = WS.Range("B8:B15").Value
lastrow.Offset(1, 2) = WS.Range("E8:E15").Value
End With
End Sub
Thank you for your help,
jfcby