VBA? to search worksheets and return contents of cell

andyroe208

New Member
Joined
May 11, 2011
Messages
4
A long title I know!

We currently use excel 2007 to keep record of many different makes and models of laptop recovery discs and the location of these discs.

I have been looking to make it as simple as possible for everyone to use by incorporating a search function (maybe a popup box) that will ask for the model number and return the location of the disc.

We currently deal with 13 different makes so have 13 different worksheets. each sheet has 5 colums that are used the first for part number second for model number, third for location, fourth for quantity and fifth for date added.

Can anyone help me in creating a method of searching all worksheets on column 2 and returning the contents of column 4 for the respective model?

if any further information is needed please feel free to ask.

Many thanks in advance
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Thank you, that has given me a good starting point but how would I go about getting the the location in our warehouse to show in a popup box?

Or does this do that an I am being really thick?
 
Upvote 0
Do you mean that you want to return the name of the sheet where the match was found>
 
Upvote 0
OK so maybe I didn't explain as well as I could have done.

I would like to search 13 worksheets for a model number, usually we search on column B for model number then we look in colum D for the location in our warehouse. We have 13 different worksheets so would need to search all of them then return the value of colum D for that particular model.
 
Upvote 0
Does the VlookupAll return the first match? If so it could be modified to return all matches from different sheets.
 
Upvote 0
I will have to test this code and see how far it would get me but I feel it would search and return the value of the search string instead of the contents of the cell 2 to the right of what we actually ask it to look for
 
Upvote 0

Forum statistics

Threads
1,224,582
Messages
6,179,670
Members
452,936
Latest member
anamikabhargaw

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