HI All,
I need a code that compare1.xls with compare2.xls sheet1 column A , but without opening the compare1.xls and get the result in compare2.xls tab sheet2.
Thanks
farrukh
HI All,
I need a code that compare1.xls with compare2.xls sheet1 column A , but without opening the compare1.xls and get the result in compare2.xls tab sheet2.
Thanks
farrukh
Last edited by farrukh; 05-31-2011 at 02:53 PM.
farrukh,
If all you're looking for is to get Compare1.xls's Sheet1 column A values put in Compare2.xls's Sheet2 column A, then in Compare2.xls, Sheet2, cell A1, put the following formula:
='C:\Test Folder\[Compare1.xls]Sheet1'!A1
Then copy down.
Note:
Change C:\Test Folder\ to the folder path that contains Compare1.xls
Be sure to include the ending \
Is that what you're looking for?
~tigeravatar
Dear tigeravatar,
I have two workbooks suppose compare1.xls and compare2.xls ,in both workbooks sheet1 columnA i want to check the similarity of content (name). if does not find similarity in any row column A the highlight the row with any color.
Thanks
Farrukh
farrukh,
The following macro should accomplish what you're requesting.
![]()
Please Login or Register to view this content.
To add a macro to a workbook:
- Save a copy of the Excel workbook you want to modify
- Always test macros in a copy so that the original is preserved in case the modifications don't go smoothly
- Open the copy of the Excel workbook you want to modify
- Use the keyboard shortcut ALT+F11 to open the Visual Basic Editor
- Insert -> Module
- Copy/Paste the code into that area
To run a macro in a workbook:
- In Excel (not the Visual Basic Editor) press the keyboard shortcut ALT+F8
- Double-click the desired macro (I named this one farrukhCompareMacro)
Hope that helps,
~tigeravatar
Last edited by tigeravatar; 05-31-2011 at 01:36 PM.
Thanks alot tigeravatar,
Little change required can you please Hard coated the path to search...
Thanks
farrukh
farrukh,
You mean instead of the macro asking you to open a file?
~tigeravatar
Dear tigeravatar
It worked for me.
strCompareFile = "c:\hi2.xlsx"
Thank you so much and your kind help may God Bless you.
Best Regards,
Farrukh
Last edited by farrukh; 05-31-2011 at 02:53 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks