code to look for a certain character?

bdunk

Active Member
Joined
Aug 1, 2002
Messages
290
Hello all, I was wondering how I would write a function that would look in a cell for specified character and then put a value in another column whether it found it or not. Example:

I have list of email addresses in column D. I would like a '1' put in column E if a "@" is found in column D.

THanks


Bdunk
 

Some videos you may like

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Oaktree

MrExcel MVP
Joined
Jun 20, 2002
Messages
7,984
To go one by one (e.g. E2 checks ony if D2 has an "@"), try =--ISNUMBER(SEARCH("@",D2)) and copy down.

To have E2 check if there is a "@" *anywhere* in column D, try = --ISNUMBER(MATCH("*@*,D:D,0))
 

lozzablake

Well-known Member
Joined
Dec 15, 2005
Messages
818
Can't you just use the FIND function?

eg in E1 put =IF(ISERROR(FIND("@",D1,1)),"",1)
 

Watch MrExcel Video

Forum statistics

Threads
1,111,910
Messages
5,541,538
Members
410,547
Latest member
htran4
Top