Excel Macro for copy row to another workbook.

Closed
orchslayer - Nov 24, 2014 at 07:51 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Dec 5, 2014 at 07:31 AM
Hello,

New-ish to excel and I'm helping improve systems at the work place.

The issue is I want to be able to copy a row. e.g.

| New | 12345678 | company name | date | todays date | Name |

and then to a pre-saved excel spreasheet, paste the selected as a new entry/overwrite.

This will all be done as a click of the button on screen.

It needs to include a search of the number in the row copied, in the excel spread sheet it is being copied too and if the spreadsheet contains the number already: to over write it. If it does not: to create a new entry into the spreadsheet. The spreadsheet would then be saved and ready for the next entry.

I have no idea whether this can be done, but I have seen copy and paste between sheets on one workbook so I thought I might ask.

I look forward to your replies!

Kind regards,


orchslayer
Related:

1 response

vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 262
Dec 5, 2014 at 07:31 AM
Hello orchslayer,

I'm not sure if this is exactly what you are after, but the sample workbook could be a start:-


https://www.dropbox.com/s/o0zu3cap4l0wr8f/Orchslayer%20-%20Copy.xlsm?dl=0


This should copy all your data and leave duplicates behind. I've added some duplicates in the sample (Sheet1) so you can see that the duplicates won't transfer to Sheet2.


In the code, wherever you see "Sheet1" or "Sheet2", rename them to match your sheet tab names exactly.

"Today's" Date will self populate.

I hope this helps.

Regards,
vcoolio.
0