Hi all,
Im new to VBA coding. Plz help me to solve this. im unable to find solution on google.
First i need to enter below values.
H1 is part Number
H2 is qty.
Then after i click on "Paste" button, my macro will executed.
As per macro it will copy data from K2 & L2(these cells values change) and paste it in N2 & O2.
its working fine.
My problem: Again after next selection my new data should paste in N3 & O3. But as per my macro again it paste in N2 & O2
First my VBA code need to check weather N2 & O2 is blank or not. if blank paste. if not balank goto N3 & O3 i.e next row.. so on..
Plz can anyone write code for that and help me.
PFA: my vba code and screenshot.
Sub Macro2()
'
' Macro2 Macro
'
'
Range("K2:L2").Select
Selection.Copy
Range("N2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
Thanks in advance.
Im new to VBA coding. Plz help me to solve this. im unable to find solution on google.
First i need to enter below values.
H1 is part Number
H2 is qty.
Then after i click on "Paste" button, my macro will executed.
As per macro it will copy data from K2 & L2(these cells values change) and paste it in N2 & O2.
its working fine.
My problem: Again after next selection my new data should paste in N3 & O3. But as per my macro again it paste in N2 & O2
First my VBA code need to check weather N2 & O2 is blank or not. if blank paste. if not balank goto N3 & O3 i.e next row.. so on..
Plz can anyone write code for that and help me.
PFA: my vba code and screenshot.
Sub Macro2()
'
' Macro2 Macro
'
'
Range("K2:L2").Select
Selection.Copy
Range("N2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
Thanks in advance.