Yet Another Complicated Search Code

nadalwannabe

New Member
Joined
May 28, 2010
Messages
4
Good Afternoon All,

My name is Parker and I recently started a new job working in the aviation industry. My first big project that I was given to work on has been excel based and I don't have all that much experience with vba... I have been search on the web and have picked up on a lot of things, but I just can't get everything figured out for what is needed to complete the project. ANY help would be greatly accepted.

Okay on to my problem... I have a workbook that has data to several companies that can do repairs on our product. on each one of their "tabs" has a list of every repair that is possible, with a simple "yes" or "no" next to it. What my boss wants is the title worksheet to have a search box pop up and be able to search the repair code (ex B0001) or the Company name and have the results come up.

This has been an dreadful task for me as this has been the only thing I've been working on for the last month. If more information is required I'd be happy to post an example file or explain in more detail what is going on.

Thank you all so very much,

Parker
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Good Afternoon All,

My name is Parker and I recently started a new job working in the aviation industry. My first big project that I was given to work on has been excel based and I don't have all that much experience with vba... I have been search on the web and have picked up on a lot of things, but I just can't get everything figured out for what is needed to complete the project. ANY help would be greatly accepted.

Okay on to my problem... I have a workbook that has data to several companies that can do repairs on our product. on each one of their "tabs" has a list of every repair that is possible, with a simple "yes" or "no" next to it. What my boss wants is the title worksheet to have a search box pop up and be able to search the repair code (ex B0001) or the Company name and have the results come up.

This has been an dreadful task for me as this has been the only thing I've been working on for the last month. If more information is required I'd be happy to post an example file or explain in more detail what is going on.

Thank you all so very much,

Parker

Hi,

Excel is not a database. I'd stick it in Access.
 
Upvote 0
Hello

Select the cell you want to look up in all other sheets, and run this macro:

Code:
Sub SearchOnAllSheets()
    On Error Resume Next
    For Each ws In ThisWorkbook.Worksheets
        If ws.Name <> ActiveSheet.Name Then
            Cells(ActiveCell.Row, Columns.Count).End(xlToLeft).Offset(, 1).Resize(, 2) = _
                Split(ws.Name & "|" & ws.Columns(1).Find(ActiveCell.Value, , xlValues, xlWhole).Offset(, 1), "|")
        End If
    Next
End Sub

It will list all found instances next to each other.

Wigi
 
Upvote 0
Thanks for the quick reply!!!

I never really thought about doing this project in Access so I will def. look into it even though I have almost no exp with it.

If I do move it into access will the data still be able to be changed and updated as needed?
 
Upvote 0
Wigi,

yes that is very true... Let's just say i'm def ready for the holiday weekend.

as for your code. It works great for returning the first occurance of the searched value. The problem with it is there are the same values that must be returned on several sheets after that; which is where I ran into problems. I always assumed that I would have to run a code like the one you gave me with some sort of loop to make that happen.
 
Upvote 0
Like I used Find, FindNext can search for more than one occurrence. The VBA helpfiles on FindNext show an example, complete code is given there.
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,472
Members
449,087
Latest member
RExcelSearch

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