Hello,
I have two Excel spreadsheets. One has attendance data from 2010, the other from 2011. I would like to add the attendance dates from 2011 where the dates end in the 2010 file. The endpoint is different for each individual.
Thank you,
Ajang
Hello,
I have two Excel spreadsheets. One has attendance data from 2010, the other from 2011. I would like to add the attendance dates from 2011 where the dates end in the 2010 file. The endpoint is different for each individual.
Thank you,
Ajang
Last edited by ajang; 11-20-2011 at 11:06 AM.
Try this macro
You will be prompted to click on any cell in each of the two sheets. This is to tell the code which is which.Please Login or Register to view this content.
Open up the VBA editor by hitting ALT F11
Insert a new module by hitting Insert - Module
Paste the macro into the empty sheet
Hit ALT F11 to get back to the worksheet.
Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007.
Martin
Hi Martin,
I tried running the Macro. Unfortunately it is not giving me the required result. May be I am not doing it the correct way. So, let me explain what I did. I tried doing it two ways.
Method 1
I opened both the spreadsheets. Then I ran the macro in 2011 spreadsheet. In the end it asks me to click on any one cell in 2011 spreadsheet and then in 2010. I could do that because both files were opened side by side.
It gives me the following error "Run-time error 1004". Application-defined or object-defined error.
Method 2
I open only 2011 spreadsheet and run the macro. In this case when it asks me to select any one cell in 2010, I cannot do that because 2011 file is open and until I don't close it; it does not allow me to move to other excel spread sheet and thus I cannot select any cell in 2010.
Try this...
Have both workbooks open. It shouldn't matter which one is currently active.
Run the macro and use the switch windows button on the View ribbon to move between the sheets.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks