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??
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,213,497
Messages
6,113,999
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top