I am having trouble getting my table to extract information across multiple columns. Currently I have two excel sheets:
The first excel sheet is a master log with a giant table filled with the hyperlinks and names of all the Engineering Standard Procedures for my company. This is the table I am extracting information from.
The second excel sheet is pictured below. It's purpose is that any word typed into the search bar returns any partial results from that first excel sheet in it. Currently my table functions by only searching one column and returning the hyperlink for that esp stated.
Here is the original link to the screenshots. Thanks to the help of @Jvdv.
What I would like is either of the following..
- After a keyword is entered into the search bar. The results show the keywords associated with that ESP along with the ESP name and Hyperlink.
For example: If I type in the word Sales. The first column of my extraction table would read "Material Vendor Identification Chart" The keywords column would have "materials sales" in it and the hyperlink column would provide the respective hyperlink.
or
- After a keyword is entered into the search bar. The program searches both the keywords and the Name of the ESP and returns a partial match with the hyperlink.
The following solution is using Power Query which is available in Excel 2010 and later versions. Mine is Excel 2016.
To tackle your question, I used the following sample data. It is stored in an Table called Tbl_ESP.
Please note I've added a new column called Hyperlinks which displays the link behind each functional hyperlinks in column A. At the moment there is no excel formula to do that automatically so you have to either use VBA or manually copy and paste links in the new column. The purpose of this step is to allow you to have the hyperlinks working in the Search Result Table.
In another worksheet I created the following Table called Tbl_Search, in which you can type in the key words and it is case insensitive. In my solution you can only use 'space' to separate each key word (you can change the setting to use comma or other preferred delimiter to separate each key word).
Then you can use From Table function in the Data tab to add both tables to the Power Query Editor. You can add one first, then exit the editor and add another one using the same function. Check this article out for other methods: The Complete Guide to Installing Power Query
I have re-named this query as Search, which will be used as the search criteria later on.
Combined
to concatenate the strings inDescription
andKeyWords
column into one text string with a space in between;Match
with the following formula, which aims to find out if any of the key words from the Search list is contained in the text string from previous step, if so returns TRUE otherwise FALSE;=List.Count(Splitter.SplitTextByAnyDelimiter(Search)([Combined]))>1
Match
column with TRUE only;Description
,KeyWords
, andHyperlinks
;Now it's time to Close and Load the above table to the worksheet where your Search table sits.
The last step is to add a column to the end of the above table and type in the following formula:
Then you should have the following:
You can choose to hide Column G
Hyperlinks
so it will only show the name of the ESP # with hyperlink embedded.Each time you type in a new string of key words in the search cell, you need to go to Data tab to Refresh Data, or press
Ctrl+Alt+F5
to get an updated search result.Please note all steps performed above are using built-in functions of Power Query Editor, and you can google all the know-hows online but feel free to ask me any questions.
Here are the codes behind the scene for reference only:
For Tbl_Search
For Tbl_ESP