Insert userform data as new row in table

LOSTKIWI

New Member
Joined
Jan 14, 2018
Messages
4
Hey guys,

Really needing some help with this, it’s had me stuck for hours now, countless google searches and YouTube videos I still can’t do it haha.

My excel experience and knowledge is umm poor to say the least, I think the last time I used it was about 10 years ago at high school to create a table or something.... so please give me an answer I can understand haha.

So I’ve created (well creating) an invoicing system to invoice clients, I so far have a database sheet “material database”, a sheet “add new item” which I’ve made a data entry form (it’s not a proper data entry form just something I’ve made up on a sheet, I have dependent drop down lists which I couldn’t figure out how to do on a proper data entry form hence why I’ve done it like that) and a sheet “control page” which has a series of buttons that will perform functions (kind of like a home page)

Now this is where I’m stuck, I click button “add new item” which directs me to the sheet “add new new item” (data entry sheet) I fill out the form as necessary and click a form control button “insert” which in theory should copy the data I’ve entered into the sheet and paste it into the material database table located on the “material database” sheet. I just cannot figure out how to make it do it so that it inserts the data into a new row in the table..

Any help is much appreciated.
Cheers
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Re: Somebody please help ��

You haven't posted any ranges so I can only post a generic statement but if you want to copy to a new row one way is.

Code:
Sub test()
Sheets("data entry sheet").Range("B2").Copy Sheets("material database").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
End Sub
 
Upvote 0
Re: Somebody please help ��

Thanks mate. Still confused :LOL:
This what I have from a recording..
Sub addnew()
'
' addnew Macro
'


'
ActiveCell.Offset(-11, -3).Range("A1:A10").Select
Selection.Copy
Sheets("Material Database").Select
ActiveCell.Offset(-13, -2).Range("A1:A50").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
ActiveCell.Offset(1, 1).Range("A1").Select
Sheets("Add new item").Select
Application.CutCopyMode = False
Selection.ClearContents
ActiveCell.Offset(10, 1).Range("A1").Select
End Sub
 
Upvote 0
Re: Somebody please help ��

Post your actual ranges as I am not going to guess what your Activecell is and also state what your starting sheets name is.

Just for future reference it is a lot easier to get an answer if state exactly what you want to happen including the ranges rather than post code that isn't doing what you want and then hoping we can decipher it and interpret what you want to happen.
 
Upvote 0
Re: Somebody please help ��

sorry mate, am completely new to this and dont understand much. Thanks again for your help its much appreciated.
I hope the following is more helpful....

Starting sheet = Add new item

From "Add new item" sheet I want to copy D6:D15, I then want to change to "Material Database" sheet and paste into the next available row in the "DATA" table, currently the next available row is A12:J12 (so the copied data needs to be spun around from a column to a row)
I then want it to automatically take me back to "Add new item" sheet and be ready to type into D6, (so D6:D15 would be clear.)

Again thanks alot and I hope this is
 
Upvote 0
Re: Somebody please help ��

Not by a computer but try

Code:
Sub test()
Sheets("Add new item").Range("D6:D15").Copy
 Sheets("material database").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.Goto Sheets("Add new item").Range("D6")
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,567
Messages
6,120,268
Members
448,953
Latest member
Dutchie_1

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