Dear Guys:
I have this code and it is not working as I need
Sub Macro81()
Dim startRow As Integer
'Get the starting row number
Windows("1.xlsb").Activate
startRow = Selection.Row
'Copy and paste the data
Range("C163:G430").Copy
Windows("ODELIS220233.xlsb").Activate
Range("C" & startRow).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("1.xlsb").Activate
Range("A163:A430").Copy
Windows("ODELIS220233.xlsb").Activate
Range("B" & startRow).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
the problem is that I select a row where I want to start the first step of the above code and start pasting the data in column c and the selected raw number
the problem occurred in step 2 of the code where I tried to copy another range of data rom Column a to column b in destination and needed it to start pasting data in column b in the same raw number I selected at the beginning.
the reason I am trying to do this, because there are columns in the range that I do not need to be copied and pasted, and I want to be able to dynamically use the macro that is why I need the code to recognize the raw number in my first selection
it works very well without adding the second step in the code
thank you in advance
Bookmarks