How to build a macro that does this... [Solved/Closed]

Report
Posts
38
Registration date
Monday January 2, 2012
Status
Member
Last seen
April 21, 2018
-
Posts
38
Registration date
Monday January 2, 2012
Status
Member
Last seen
April 21, 2018
-
Hello guys,

I would like to build a sheet that contains several names and infomation pertaining to each name.
The first tab would be the search interface. I would like to be able to just type in the name in that first page and I would like that name and all the info just to come up in the assigned cells. I guess it would have to incorporate vlookup in some sort of way. Any ideas please?

1 reply

Posts
2657
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
September 22, 2020
440
Hi DG83,

Well, you basicly answered your own question.

Make sure that on your second sheet you put your names (the ones you want to look up) in the left most column of your data matrix for VLOOKUP to work.

So build your database, try VLOOKUP and post back if you get stuck/confused/need advice etc..

Best regards,
Trowa
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
760
I am missing some thing here. If you want to filter for "Peter Johnson" then why filtering on column A for Peter and Column B for johnson will not work. ?
On the other hand if you are looking for all records where column A = peters OR column B = Johnson, then a custom formula can be used a intermediary step
Posts
38
Registration date
Monday January 2, 2012
Status
Member
Last seen
April 21, 2018

I think the best solution for my needs is the Findall function. I am just stuck with the proper usage of it. Do you have any experience using it?
All I basically need from excel is to search through the document and return the search criteria in a sheet other than where the raw data is. I could use advanced filter, it works but when you are trying to give a report to your boss its better be simple. What would be the best is to have a pop up window in a search tab, where one could enter the search criteria from column A from the raw data sheet (sheet 2) and in the search tab i would have all the fitting records displayed.
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
760
Asking for a solution without full explanation is waste of time for every one. I don't see any "findAll" function here. If you are referring to FindAll function that was given in other thread, that function has nothing to do with what you want.
You need to totally explain your issue from what I see
Posts
38
Registration date
Monday January 2, 2012
Status
Member
Last seen
April 21, 2018

Okay, I will give the simplest example, if we dont understand each other from this, lets just leave the issue. But thanks for your time anyway. I really appreciate it! so lets see the example.

Sheet2: I have one letter in each cell from A1 to A5 (A1:a, A2:b, A3:c, A4:a, A5:d). Also I have one number from B1 to B5 (B1: 1, B2: 2, B3:3, B4: 4, B5:5). I have nothing else on this sheet.

Sheet1: this is supposed to be the page for searching for values in Sheet2. I would like to be able to do the following: on this search sheet (sheet 1) I would like to be able to enter into cell A1 any of the letters from Sheet 2 from column A. For example if I enter a, this should give me the result on Sheet 1: a 1 and a 4. This is because these letters and numbers are beside each other in sheet2. So letter a would be returned for example in cell A2 and number 1 would be returned in cell B2 of sheet 1. But I dont really mind in which cells are the results returned on sheet 1.

If I was to enter b into the A1 field of Sheet1 I would get the result of B 2.
I am aware that this can be achieved with the advanced filter function of excel but the process is too long if I want to search for numerous values from column A. Also if I were to simply filter the results from Sheet 2 this would give me the results as well. But what I want is what is described above within the example.
Posts
38
Registration date
Monday January 2, 2012
Status
Member
Last seen
April 21, 2018

I managed to get this working with Trowa s input from earlier.
Thanks guys both!!!!