A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
I found the formula on a you-tube video
here are links
https://www.youtube.com/watch?v=e2-uc3nOKlE&t=10s
https://www.youtube.com/watch?v=8gqodEiDoJ8
and these are his steps
Steps
1 Type few characters as a search term in A1
2 Create a "SEARCH" function in E2
=SEARCH($A$1,F2)
This function returns either a number or a Value error
3 Put the SEARCH function in an "ISNUMBER" function
=ISNUMBER(SEARCH($A$1,F2))
Converts the result to "TRUE" & "FALSE"
4 Put the above functions into an "IF" function
=IF(ISNUMBER(SEARCH($A$1,F2)),1,0)
Converts the result to ones & Zeros & "FALSE"
a "ONE" means the keyword exists
5 Replace the "1" by a MAX function to increment each occurrence
=IF(ISNUMBER(SEARCH($A$1,F2)),MAX($E$1:E1)+1,0)
Lock the first reference for the MAX
6 Create a "VLOOKUP" function to extract all Occurences
The "ROWS" function creates incremental numbers
Use "ROWS" as a Lookup value inside the "VLOOKUP"
Lock the First reference for the Rows function
=VLOOKUP(Rows($H$2:H2),$E$2:$F:$135,2,FALSE)
Drag the VLOOKUP function down to almost 50 cells
7 Eliminate errors the VLOOKUP function might return by including it in an ISERROR
=ISERROR(VLOOKUP(Rows($H$2:H2),$E$2:$F:$135,2,FALSE),"")
If there is an error a blank "" will be returned
8 Count the number of results returned by the VLOOKUP function
We'll use a COUNTIF function to count Text
We need to use some wild cards (Replacement characters)
The wild cards I am using are
? Replaces any one single character
\* Replaces any number of characters
=COUNTIF(H:H,"?\*")
9 The OFFSET function store a reference to the range of results of the VLOOKUP
OFFSET requires 5 arguments, the first 3 describe the Starting point
the last 2 describe how far down and to the right you expand the range
For the number of Rows down, I will use my COUNTIF function
Create the function in cell in G2
It will return only the first result of the VLOOKUP function
=OFFSET($H$2,0,0,COUNTIF(H:H,"?\*"),1)
Copy the function to use it in the next step
10 Create a Defined Name: Formulas Tab --> Define Name
Name it "MyList"
Paste the copied OFFSET function in the "Refers To" box
Hit OK
11 Create the drop list on the Data Tab --> Data Validation
Shortcut: ALT, D, L
Allow: List
Source: "MYList" (You can hit F3 for selecting the name
Hit OK
Test your Drop List by typing different keywords
To be able to copy down column
You need to change This $A$1
=IF(ISNUMBER(SEARCH($A$1,F2)),MAX($E$1:E1)+1,0)
to (INDIRECT(CELL("address"))
=IF(ISNUMBER(SEARCH(INDIRECT(CELL("address")),F2)),MAX($E$1:E1,0)+1,0)
then select the cells and re do the data validation
hope this helps