Copy and paste row with dropdown, before cells and then reset everything

DcoltTech

New Member
Joined
Feb 6, 2015
Messages
8
ProductProduct codeProduct DescriptionQuantityprice eachtotal price
a.product
dropdown
a.codea.description1£3.99£3.99
vat
total

<tbody>
</tbody>

Hi there,

I am looking to create a script, will copy and paste the first row of products, then paste that into the next blank row above vat. When that is pasted, I would like it to reset all cells to their original syntax, and reset the dropdown. I will then use "ActiveCell.Offset(1).EntireRow.Insert" to insert another blank row under this. I currently have the copy and paste script.

Sub Copyandpaste()
'
' Copyandpaste Macro
Range("$A$18:$F$18").Select
Selection.Copy
Range("A49").Select
ActiveSheet.Paste

End Sub

How would I do this?

Thanks in advance.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
What original syntax? What dropdown?

Record a macro where you do everything manually and then post the code here. It then could be modified.

TIP: Because the Vat cell will move each time you insert a row, it would be helpful to create a Named Range for the Vat cell. That cell could then be referenced in the code by its name, and the code would not have to go "find" it. The named range will automatically change with the Vat cell location each time a row is inserted above it.
 
Upvote 0
Hi there, and thanks fr your reply.

I have linked the basic spreadsheet : http://1drv.ms/1vu6VPF
The style I want: http://1drv.ms/1vu7l8p

Basically, I wan to get rid of the block of select products rows. I just want one, and under that a blank row, and then a box where the price and vat etc goes, as seen in the second link. I would then like a macro, that when run, copies the row, adds a row under it then pastes it. I would then like it to reset the dropdown, and show the original syntax.

Regards

DcoltTech
 
Upvote 0

Forum statistics

Threads
1,216,129
Messages
6,129,046
Members
449,482
Latest member
al mugheen

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