Cartillo
asked on
Search and Display Data
Hi Experts,
I would like to request Experts help create a macro for search data from MasterData workbook and displayed at Searchdata workbook (A5:E). Cell C2 at Searchdata Workbook will be used for type the search data. If the search data is available in the MasterData, the whole data columns (A:E) need to display at Searchdata. If not, message box will alert as ”Search Data not found”. I have manually copied sample data at SearchData workbook for Experts to get better view. Hope Experts will help me to create this feature.
SearchData.xls
MasterData.xls
I would like to request Experts help create a macro for search data from MasterData workbook and displayed at Searchdata workbook (A5:E). Cell C2 at Searchdata Workbook will be used for type the search data. If the search data is available in the MasterData, the whole data columns (A:E) need to display at Searchdata. If not, message box will alert as ”Search Data not found”. I have manually copied sample data at SearchData workbook for Experts to get better view. Hope Experts will help me to create this feature.
SearchData.xls
MasterData.xls
ASKER
Hi Wchh,
Thanks for the code. Have tested the code and it shows and error as “ script out of range” at this line:
Set Shtm = Workbooks("MasterData.xls" ).ActiveSh eet
I believe this is mainly because my MasterData workbook is resided in a network folder (\\dc04\data), is possible to locate this workbook in this folder?
Thanks for the code. Have tested the code and it shows and error as “ script out of range” at this line:
Set Shtm = Workbooks("MasterData.xls"
I believe this is mainly because my MasterData workbook is resided in a network folder (\\dc04\data), is possible to locate this workbook in this folder?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forgot to attach the file... SearchData.xls
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi apresence,
Can you add other column as well besides column D, need to look for column A and E as well. One more thing, Search workbook is not sharing the same folder with MasterData.
Hi Saqib,
It shows an error at this line as "define object error"
Me.Worksheets(1).Range("C2 ").Validat ion.Add xlValidateList, , , vlist
Is that possible to set the Masterdata folder name: (\\dc04\data)
Can you add other column as well besides column D, need to look for column A and E as well. One more thing, Search workbook is not sharing the same folder with MasterData.
Hi Saqib,
It shows an error at this line as "define object error"
Me.Worksheets(1).Range("C2
Is that possible to set the Masterdata folder name: (\\dc04\data)
are you using the same files which were uploaded or a different file?
ASKER
Hi ssaqibh,
Using the same file that you've posted.
Using the same file that you've posted.
with the same master you posted?
ASKER
Hi ssaqibh,
Yes, you're right.
Yes, you're right.
That beats me. It is working fine with me. Anyway that was an additional feature where I tried to include a dropdown list in C2 so that selection would be easy.
For the moment you can delete the macro in the workbook module and see if the macro in the worksheet module is good enough.
Saqib
For the moment you can delete the macro in the workbook module and see if the macro in the worksheet module is good enough.
Saqib
ASKER
Hi ssaqibh,
The error happen after I open the workbook, when I click “End” the dropdown list disappear
I know. The dropdown is not working
Delete that workbook macro and save the file and reopen it and see if the other macro works
Delete that workbook macro and save the file and reopen it and see if the other macro works
Cartillo, I'd be happy to create a version that also searches on other fields if you post a new question. I answered the question you asked.
My version will search on other fields as well with no change.
Cartillo, with the workbook macro in place try opening the master workbook first and then open the search workbook
ASKER
Hi apresence,
I posted new Q for extent the search function. Hope you can help me, attached the link:
https://www.experts-exchange.com/questions/26927593/Add-additional-search-function.html
I posted new Q for extent the search function. Hope you can help me, attached the link:
https://www.experts-exchange.com/questions/26927593/Add-additional-search-function.html
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi ssaqibh,
I have deleted macro (Sub Workbook_Activate) and tested only with sheet 1 macro, however the error still persist at this line:
"Set mwb = Workbooks("masterdata").Wo rksheets(" masterlist ") as "subscript out of range"
I have deleted macro (Sub Workbook_Activate) and tested only with sheet 1 macro, however the error still persist at this line:
"Set mwb = Workbooks("masterdata").Wo
ASKER
Hi apresence,
Hope you will consider this question:
https://www.experts-exchange.com/questions/26927593/Add-additional-search-function.html
Hope you will consider this question:
https://www.experts-exchange.com/questions/26927593/Add-additional-search-function.html
I suggest you split the points for this one between myself and ssaqibh since we both worked to assist you with a solution. Thanks!
ASKER
Hi apresence/Saqib,
Thanks for the great help.
Thanks for the great help.
Open in new window