Check that data pasted contains correct headings

AndyDevine1

Board Regular
Joined
Jun 1, 2006
Messages
172
Hi there
Hoping you can help?

We copy and paste data from a CSV data dump into an Access table

We need to check the data headings match those in the Access table in case the headings/order of the original data supplied is different (this happens from time to time)

To do this check, we copy-paste the data into excel first to check, then copy and paste the data into the Access table when we are happy the data headings are the same

Is there a way of doing this...eg getting Access to check the headings on the data to be copy-pasted?

I was thinking we could copy-paste the data including the headings into the first row of the Access Table and then get Access to check that the headings in the first row against the headings in the table?

However, I dont know how to do this...also thought this may not work as the data contain numerical values but the first row will be text?

Be great to get some advise and help on this?

Thanks

Andy
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
By chance do you have access to the data source based on that CSV data dump?

I would just bypass the middle man and link your Access table to that data source if you could.

There are scripts that can be written to compare fields to tables but that is probably a more advanced option based upon what you need.

How many fields are different usually or variations of the field names compared to the field names in your access table?
 
Upvote 0
Build a macro, that IMPORTS the csv, then the macro can then check every field for the correct names.
Then run an Access macro to import it straight. No copy /paste
 
Upvote 0
Thanks, can you help me build the macro?

I've had a look online and on these message boards but I'm not clear what I need to do...

I can do VBA in Excel but am a newbie for Access VBA

Cheers
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,726
Members
449,093
Latest member
Mnur

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