![]() |
Searching for keywords
is there a way of searching a range of cells, to see if ANY of th contents of the cell match a string. For example, if cell A1 contain the words "Pizza, Milk, Bread", and I am only searching for pizza, still want to select that cell? Selection.FormulaR1C1 = "=OR(RC[-3]={""" & FVar & """})" I am using the above code to filter my cells right now....but this onl works if the ENTIRE cell equals my search variable(FVar)? is there a wa of changing this code to test whether any contents of the cell equal m search variable?? Thanks for the help! -- tess45 ----------------------------------------------------------------------- tess457's Profile: http://www.excelforum.com/member.php...fo&userid=1393 View this thread: http://www.excelforum.com/showthread.php?threadid=26218 |
Searching for keywords
Hi
You can use also Autofilter to do this. Custom Contains -- Regards Ron de Bruin http://www.rondebruin.nl "tess457" wrote in message ... is there a way of searching a range of cells, to see if ANY of the contents of the cell match a string. For example, if cell A1 contains the words "Pizza, Milk, Bread", and I am only searching for pizza, I still want to select that cell? Selection.FormulaR1C1 = "=OR(RC[-3]={""" & FVar & """})" I am using the above code to filter my cells right now....but this only works if the ENTIRE cell equals my search variable(FVar)? is there a way of changing this code to test whether any contents of the cell equal my search variable?? Thanks for the help!! -- tess457 ------------------------------------------------------------------------ tess457's Profile: http://www.excelforum.com/member.php...o&userid=13938 View this thread: http://www.excelforum.com/showthread...hreadid=262187 |
Searching for keywords
Look at help for the worksheet functions Find and Search
-- Regards, Tom Ogilvy "tess457" wrote in message ... is there a way of searching a range of cells, to see if ANY of the contents of the cell match a string. For example, if cell A1 contains the words "Pizza, Milk, Bread", and I am only searching for pizza, I still want to select that cell? Selection.FormulaR1C1 = "=OR(RC[-3]={""" & FVar & """})" I am using the above code to filter my cells right now....but this only works if the ENTIRE cell equals my search variable(FVar)? is there a way of changing this code to test whether any contents of the cell equal my search variable?? Thanks for the help!! -- tess457 ------------------------------------------------------------------------ tess457's Profile: http://www.excelforum.com/member.php...o&userid=13938 View this thread: http://www.excelforum.com/showthread...hreadid=262187 |
All times are GMT +1. The time now is 01:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com