SOLVED
Home

How to paste till last row using Macro

Highlighted
Chandrakanth K
Contributor

Hello Team,

 

I have two columns "System" and "CC". I need to past dolphin after the last row till i have values in "CC".

How do i code this. when i record i am getting a range but range always changes. Need help

 

Attached Macro File.

 

Regards,

Chandrakanth.K

1 Reply
Highlighted
Solution

 

How about the below?     Cells(Rows.Count, 2).End(xlUp).Row     finds the last used row in Column 2. 

 

 

Sub FillDolphin()

Dim lRow As Long

lRow = Cells(Rows.Count, 2).End(xlUp).Row

Range("A4:A" & lRow).Formula = "Dolphin"

End Sub

 

Related Conversations
AD User Migration Exchange Mailbox last
Hermulus in Exchange on
1 Replies
Questions About Pasting in OneNote Online
Asia_Nidyra_Thomas in OneNote on
0 Replies
A problem with the Zoom level of a Tab
Tavory in Discussions on
9 Replies
Excel Table Size in Macro
WayneEK in Excel on
6 Replies
Macro issue with email connectivity
unhappyuser in Excel on
21 Replies
Marco to create .CSV
DooDahMan in Excel on
0 Replies