How to inser a new row by copying a Specific row and paste it at bottom of the row using VBA

saran985

New Member
Joined
Nov 6, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I need to copy a specific row (row 10) of worksheet1 and paste it to the bottom of the row each time I run the macro. Row 10 needs to be hidden after copying. Each time when I run a macro to insert a new row, a new row has to be inserted into the bottom row.

Need support. Thanks.

1667741965043.png
 
That's fine if you need it but my code was designed to be used when row 10 was already hidden.


Since it is never to be used, why have it unhidden at all?
Yeah, just noticed. It worked perfectly with the row hidden. Thanks for your support.

(The purpose I want row 10 to be hidden is I have formatted row 10 using conditional formatting and provided information on what data needs to be entered using data information. If the user deletes row 10 by mistake, then those properties might not get copied)

Thanks.
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I tried to help here but never did understand the objective.
I tried the script provided here and it hides row 10 but then you cannot enter new data in row 10 if it's hidden so not sure what the objective is. But I'm glad to see you now have an answer that works for you
Thanks for your kind gesture.
 
Upvote 0
It worked perfectly with the row hidden. Thanks for your support.
You're welcome. Thanks for the follow-up. :)

(The purpose I want row 10 to be hidden is I have formatted row 10 using conditional formatting and provided information on what data needs to be entered using data information. If the user deletes row 10 by mistake, then those properties might not get copied)
Another way of putting that is that row 10 is used as a 'template' row for any rows below that the user wants to enter data in.
 
Upvote 0
Yeah, just noticed. It worked perfectly with the row hidden. Thanks for your support.

(The purpose I want row 10 to be hidden is I have formatted row 10 using conditional formatting and provided information on what data needs to be entered using data information. If the user deletes row 10 by mistake, then those properties might not get copied)

Thanks.
OK I now see the objective
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

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