Hi all,
I'm a newly registered member but have been a stalker of this site for the last week to try to learn the basics of macros. Was hoping someone could help me with my problem.
I am trying to copy a range from Workbook1 and paste it in to Workbook2, in a cell that is defined by a number in a cell (A1) from Workbook1 (or WB2).. Is there a way to do an alternative to a lookup function to select the right cell to paste in to?
This is what I have if the lookpup function worked:
Really appreciate your help and time.
I'm a newly registered member but have been a stalker of this site for the last week to try to learn the basics of macros. Was hoping someone could help me with my problem.
I am trying to copy a range from Workbook1 and paste it in to Workbook2, in a cell that is defined by a number in a cell (A1) from Workbook1 (or WB2).. Is there a way to do an alternative to a lookup function to select the right cell to paste in to?
This is what I have if the lookpup function worked:
Code:
Sub COPYPASTE()
Windows("Workbook1.xlsm").Activate
Range("o28:o107").Select
Selection.Copy
Windows("Workbook2.xlsm").Activate
Range(LOOKUP(a1,E2:BE2,E4:BE4).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=True, Transpose:=False
End Sub
Really appreciate your help and time.