fishandtril
New Member
- Joined
- Nov 15, 2022
- Messages
- 13
- Office Version
- 365
- 2021
- Platform
- Windows
Hello
I need some help with my macro to paste data.
I am copying a value from C2 into Column A but only want to paste values to cells which contain data in column B
I normally use Shift Ctrl arrow down to find last cell but as this is column A it returns the very last cell in Excel (A1048575)
What do I need to do to only paste as far as the last cell in column B
I need some help with my macro to paste data.
I am copying a value from C2 into Column A but only want to paste values to cells which contain data in column B
I normally use Shift Ctrl arrow down to find last cell but as this is column A it returns the very last cell in Excel (A1048575)
What do I need to do to only paste as far as the last cell in column B
Code:
Range("C2").Select
Selection.Copy
Range("A17").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A17:A1048575").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False