How to populate line to the last empty one.

gergo1001

New Member
Joined
Oct 26, 2018
Messages
8
Hi,

I put trough this programme to copy information form B10:W10 and populate that into the next empty line. I just don't know how to write that down to make it work. Can you please help me with that? Thanks

Sub PopulateLine()
'
' PopulateLine Macro
'


'
Range("B10:W10").Select
Selection.Copy
Range("B15:W15").Select
ActiveSheet.Paste
Range("B15").Select
Application.CutCopyMode = False
End Sub
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi,

Not sure to fully understand your objective ...

You can test this macro :

Code:
Sub PopulateLine()
Dim i As Integer
For i = 15 To 20
  Range("B" & i & ":W" & i).Value = Range("B10:W10").Value
Next i
End Sub

Hope this will help
 
Upvote 0
Se if this is what you want:
Code:
Sub Copy_Range()
'Modified 11/26/2018 7:58:56 AM  EST
Application.ScreenUpdating = False
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "B").End(xlUp).Row + 1
Range("B10:W10").Copy Cells(Lastrow, 2)
Application.ScreenUpdating = True
End Sub
 
Last edited:
Upvote 0
So basically, I added a row where the user can fill out cells, than press the macro button which populate the info in the accurate cells in the following blank row. I try out these two. Thank you very much
 
Upvote 0
Glad we were able to help you.
Come back here to Mr. Excel next time you need additional assistance.
So basically, I added a row where the user can fill out cells, than press the macro button which populate the info in the accurate cells in the following blank row. I try out these two. Thank you very much
 
Upvote 0

Forum statistics

Threads
1,224,755
Messages
6,180,758
Members
452,996
Latest member
nelsonsix66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top