finding part of text in a cel ... not using left(xxxx,10) e

bill151515

Board Regular
Joined
May 19, 2005
Messages
87
i am using a macro that loops thru and peforms a function based on wheter or not a cell has certain characters of text in it . currently it is the first 5 characters - "hello" so i am using left("hello",5) as the check ...

however the hello may show up at the end or in the middle ... ex "sayhello", "sayhellotoday" so the left("hello",5) may not always work ... is there something similar to the left() function that can be used to see if the characters are there whether they are the first 5 last 5 or somewhere in between???? basically just looking for the presence of the predefined string "hello" anywhere in the cell??
 

Some videos you may like

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,047
Office Version
  1. 365
Platform
  1. Windows
Take a look at InStr.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,083
Messages
5,570,124
Members
412,305
Latest member
Mozz
Top