ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   substring check (https://www.excelbanter.com/excel-programming/405193-substring-check.html)

Net Doe

substring check
 
In VBA, how can I check if a substring exists in a cell? Say
cells have
ABC123
D123EF
GHI456

How can I test if a cell has "123" in it, in this case, the top 2 cells
will pass the test.



Ron Rosenfeld

substring check
 
On Mon, 28 Jan 2008 19:16:03 -0500, "Net Doe"
wrote:

In VBA, how can I check if a substring exists in a cell? Say
cells have
ABC123
D123EF
GHI456

How can I test if a cell has "123" in it, in this case, the top 2 cells
will pass the test.


INSTR function
--ron

Net Doe

substring check
 
"Ron Rosenfeld" wrote in message
...
On Mon, 28 Jan 2008 19:16:03 -0500, "Net Doe"

wrote:

In VBA, how can I check if a substring exists in a cell? Say
cells have
ABC123
D123EF
GHI456

How can I test if a cell has "123" in it, in this case, the top 2 cells
will pass the test.


INSTR function

--ron

Thanks!




All times are GMT +1. The time now is 08:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com