0

I have an excel spreadsheet that will be ran on VM's that cannot run VBA code. So, all features have to be created in excel formulas.

=MATCH(INDIRECT("G"&ROW()), LISTS!$C$2:$C$25, 0)

This is the formula I am using with conditional formatting. I need a cell to highlight if any word from a range of cells on second sheet match any portion of current cell. For example. I have "alpha 1b ny" in cell needing format and I have a range that contains "alpha, bravo, Charlie, delta". This should highlight because alpha matches. With above formula if cell only contains alpha it will highlight. If it contains anything else it is ignored. I've tried adding "*" before and after indirect("G"&row()). Any help would be greatly appreciated.

1 Answer 1

0

Screen shot

 '=IFERROR(INDEX(List,MATCH(1,COUNTIF(A1,"*"&List&"*"),0)),"")

'List' is a named range with your list of words.

Edit - as an array formula it has to be entered with Ctrl-Shift-Enter:

Screen shot

Sign up to request clarification or add additional context in comments.

4 Comments

Tried this to no avail. This formula is going in a conditional format and needs to pull from current cell in range. for example "alpha 1b ny" is in a column of 100 cells with similar phrases and all of them need to be compared and highlighted based on partial match from what's in LIST.
I believe to add clarification to what I want to do is this. I have 2 columns: one Input the other Reference. In reference I have Alpha, Bravo, Charlie. In Input an individual will enter a string like "alpha 1b ny". Because it has Alpha in it it will highlight. In your formula COUNTIF(A1,""&List&"") has range and value swapped? I've tried using wildcards on ranges and it doesn't work. If this is possible then I should be able to get this to work.
Found the solution. =SUMPRODUCT(--ISNUMBER(SEARCH(IF(LISTS!$C$2:$C$25<>"",LISTS!$C$2:$C$25),$G5)))>0
Forgot to mention it's an array formula, so should be entered with Ctrl-Shift Enter - sorry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.