Once upon a time, I utilized this site for help in writing a macro that would copy data from one sheet into the next available column of another sheet. Today, I want to do something similar, except I want it to be the next available row. I pulled up the code from my successful column copy exercise and modified it by just trying to change the column references to row references. But, clearly that didn't work. help!
Thanks!
Sub Inventory()
'
' Inventory Macro
'
' Keyboard Shortcut: Ctrl+i
'
Option Explicit
Sub Trend()
Dim LR As Long
Dim NR As Long
' Keyboard Shortcut: Ctrl+i
Application.ScreenUpdating = False 'turn off screen flicker
With Sheets("DATA")
.Range("B2").Copy
End With
With Sheets("Inventory")
LR = .Range("B38").End(xlUp).Row
If LR = 1 Then
NR = LR + 1
Else
NR = LR + 1
End If
.Cells(NR, B).Paste
End With
With Sheets("Data")
.Range("B6").Copy
End With
With Sheets("Inventory")
.Cells(NR, C).Paste
End With
End Sub
Bookmarks