Please Help :)

HeyThere

New Member
Joined
Dec 10, 2009
Messages
6
Okay, so i am aware of what I wish to happen, but i do not know where to start in making it happen.
I am creating a system in of which a user can input data into, (row of data, including item names, date, costs etc) Once this has been filled in on Sheet 1, a button could maybe trigger a macro/code that places this line or information into a table in Sheet 2.
Once the data has been cut/copied over i no longer wish for the data to still be in Sheet 1. (but i could always set up a separate clearing macro).
Another problem i am having is when more data is sent to sheet 2 i do not want it to paste over the data already in sheet 2, and instead add it underneath or on-top of it.

Sorry if this is confusing If you need more info please ask. i Realllly need this to happen. ;)

P.S If you can think of a similar way of doing this i am willing to alter my original idea drafting. :)
 
Last edited:

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Welcome to the Board!

This will cut row 1 from the active sheet and move it to the first empty row in sheet 2:

Code:
ActiveSheet.Rows("1:1").EntireRow.Cut Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Offset(1)

Hope that helps,
 
Upvote 0
Thank-you for such a quick reply :)
This may sound daft, but where should i place this line of code, and how can i apply it / what too, to get it to work when i choose it to ;)
 
Upvote 0
Open the Visual Basic Editor with ALT+F11. Then goto Insert-->Module.

In the new pane that opens on the right enter "Sub NewMacro" and hit enter.

You'll now see:

Code:
Sub NewMacro()
 
End Sub

Now you can copy the code I posted in between the Sub and End Sub lines. Change the Sheet2 reference to the actual name of the sheet where you want the data posted. ALT+Q will exit the VBE back to Excel.

Now you can draw a button on your sheet from the Forms toolbar. When you're done drawing it you'll get an Assign Macro prompt. Select "NewMacro" from the list.

Now whenever you click the button, row 1's data will be copied to the sheet you chose.
 
Upvote 0
Thank-you for such a quick reply :)
This may sound daft, but where should i place this line of code, and how can i apply it / what too, to get it to work when i choose it to ;)

Oops never mind, i remembered how :p thank-you very much.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,678
Members
449,116
Latest member
HypnoFant

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