searching for the first few characters in an active cell

C

Chris

If the active cell has the first 7 characters = "example", I want it to return a value in another cell. ie,

"example 7", "example fourty nine" and "example spiderman"

would all return a value, where as...

"7", "fourty nine" and "spiderman"

would not.

TIA
Chris
 
I

ijb

A function in one cell cannot change the value in another cell.
If, on the other hand, you want a function to return a value if another cell
has values as you say, you do not need a vb function.
The following formula will work
=IF(left(sourcecell,7)="example",valueyouwanttoreturn,"")

--
If I've mis-understood the question please tell me.

HTH

ijb

Remove nospam from my e-mail address to talk direct

Not MCSD, MVP, TLA, P&P, PCMCIA, etc just trying to help


Chris said:
If the active cell has the first 7 characters = "example", I want it to
return a value in another cell. ie,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top