Macro tutorial - Insert row at bottom of table

preview_player
Показать описание
In this video we outline how you can use a macro to insert a row at the bottom of your table.

If you are new to excel macros then you will need to follow this quick playlist to get started:

The code that we used in this example is as follows.

Range("A" & Rows.Count).End(xlUp).Select
ActiveCell.EntireRow.Insert

If you have any questions or comments please put these in the comments section below.

Thankyou for liking and subscribing.
Рекомендации по теме
Комментарии
Автор

Please take a second to help me by Subscribing to the channel! Your help is much appreciated!

Twoperscent
Автор

Hi, i have i problem in macro, i'm working in a sheet which had some data and i want to copy this data to an other sheet in a table and when i click the button it's working normal but if i want to add more data in the next row it overwrite the first one

VOIRA
Автор

How can I combine this method together with inserting formulas in VBA?
I also want to format one of my cells with a fill color, based on a number in that cell (ex. a four siffered code). How can i manage this, in combination with the row-adding method explained here?

jrgeneckroll
Автор

Hello, I have managed to get this to work (thank you! :)) however I was wondering if you could explain how to add another command (in addition to the existing one) that will insert a new line beneath a different set of data i.e. have two buttons to add a line at a different locations? Thank you

zigzag
Автор

how to add a new row one cell under the total cell automaticlly

kallanet
Автор

Hello! Great stuff, really helpful. Can you suggest a solution for deleting that line (above "Total")? Thank you!

jakastrojansek
Автор

It works, but new row has been created up to my last entry.. why? I need the new row at the buttom of my old entry. Is it a table? or is it just Data? I mean, it was used the option "create table"?

miguelmolano
Автор

Hi There.
Thank you for this tutorial. It's been really helpful.
I'm now using this macro, however some of the cells in my row have lists which are in turn dependant on the list selected in the previous cell. How do I get the macro to recognise that there's a list so that when the row is inserted it has ALL of the formatting (lists etc) in the new row.
Does that all make sense?
Thank you.

boyilookatyou
Автор

I want the function to add a new row to the bottom of a range. Not a table. How do I do this? I have tried this solution, but it did not work for me. Thanks!

johnrockwell
Автор

How to insert a under a sub heading … for instance: you have a register and sub headings for your drawings and reports.. i need to insert a line at the last line between these sub headings for instance, could you help with this

d.v.v
Автор

I inserted only the code with excel data like yours but this error pops up " Run-time error 424 Object required "

gershona.
Автор

Hello, I tried to copy a couple of rows then paste to the bottom....but I can't get it to you have time to take a look at the code? When I go to debug the ActiveCell.EntireRow.Paste line is always highlighted.




Sub Copy_Paste()
'
' Copy_Paste Macro
' Copy Paste Dam Title list
'

'

Rows("18:19").Select
Application.CutCopyMode = False
Selection.Copy
Range("D" & Rows.Count).End(xlUp).Select
ActiveCell.EntireRow.Paste
End Sub

dailysketcher
Автор

I found your video and its exactly what I am looking for but the code is not working for me as it is in your video. Using your video as an example, rather than creating a row at the bottom, its creating the row at A4 and pushes all rows down. Unable to figure out why

yvettemarty
Автор

Hi, i just insert new column just before the last column with it Dim r as rangeSet r header", , , xlwhole)r the problem is i want to copy he column header for this new column, any idea??Thx

witracezha
Автор

How do I add this to a new Macro? It will not allow me to use this Command only to add a new row to my existing data...

vex
Автор

Can you help me the inserted rows is the same content from above rows? What is the code? Thank you!

romieisanan
Автор

Thank you
If I want to insert two rows together with a specific format above total, what is the code?

Thanks again

shahadal-harbi
Автор

How about adding 5 rows? without duplicating the last line of code... so it "looks" better in the code.

sophiathreadgall
Автор

I want to do exactly what you have explained but I would like to keep the formulas and formatting from the row above.

gplans
Автор

How to insert number of rows in a protected excel table in single click

lomakila