Userform Database Help

kevinwong1991

New Member
Joined
Aug 29, 2011
Messages
4
Hi,

I have a database which gets updated once a month, with a large inflow of new data. There are mutiple rows and columns that are to be added.

What happens every month is that a report is run with several columns, and then is to be copy and pasted into the database. However, the database has additional columns added within it, so that copy and pasting columns become somewhat tedious.

Is it possible to have a userform which will be able to identify column breaks and paste into a defined column in the database?


Will this work for multiple rows too?
Thanks!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
so let me try and see if i have this right.

you wish to have a form to deal with new data on a different excel file and move it to the "database" file automatically?

if so no real need for a userform unless you need some kind of user input
 
Upvote 0
Sorry I dont think I was being too clear.

I have a worksheet named "database" in my workbook. New data is to be added to this sheet every month, from external data run from a different program. That program comes up with an excel file which needs to be integrated with the "database" worksheet in the workbook.

The "database" worksheet has more columns added in than the in data file which the external program provides. As a result, I'm trying to find a way to easily copy and paste the data from the external data file and add it in to the "database" worksheet.

Is there a way to do this? I'm not sure if userforms are the way to go. I was thinking that because you can use the offset property but I'm not sure.
 
Upvote 0
ok, i understand.

is this workbook that gets the new data always named the same?

do you wish to copy all the data in this new data workbook?

and are the coloums of data setup the same (minus the extra ones in database)?
 
Upvote 0
ok something like this changed to fit your needs

Code:
[COLOR=black]'Opens source file
Workbooks.Open ("d:\test\Survey Extract Agents.xls")

'copy sheet from another workbook before first tab of Book2
Workbooks("Survey Extract Agents.xls").Sheets("SurveyExtractAgentsSheet").Copy After:=Workbooks("Raw_Test_Data.xls").Sheets("RawTestData")
'Sheets("SurveyExtractAgentsSheet").Select
Sheets("SurveyExtractAgentsSheet").Name = "SurveyData"
[/COLOR]

this was taken from here: http://www.mrexcel.com/forum/showthread.php?t=318078&page=2
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,740
Members
452,940
Latest member
Lawrenceiow

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