VBA - add new Row after the last one, with add data

dudi2s

New Member
Joined
Dec 27, 2020
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Hi,
I searched for a long time and could not find ,
i want to add new row after the last row in a table, and- copy Some specifics Cells from the last Row to the New Row ;)

If it additionally checks if the line is empty, that's great!

Thanks a lot, David.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
i find a way to make new row and put data , but if i want to take the last row formula .. (for Example- "=IF(N25="","",N25/L25)" but with auto change to next row (N26)
VBA Code:
Sub AddRow01()

Dim ws As Worksheet
Set ws = ActiveSheet
Dim tbl As ListObject
Set tbl = ws.ListObjects("Sales")
Dim newrow As ListRow
Set newrow = tbl.ListRows.Add
With newrow
    .Range(1) = ""
    .Range(2) = ""
    .Range(3) = ""
    .Range(4) = ""
    .Range(5) = ""
    .Range(6) = ""
    .Range(7) = ""
    .Range(8) = "=V49"
    .Range(9) = ""
    .Range(10) = ""
    .Range(11) = ""
    .Range(12) = ""
    .Range(13) = ""
    .Range(14) = ""
    .Range(15) = ""
    


End With

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,994
Messages
6,122,633
Members
449,092
Latest member
bsb1122

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