Quick Question

D

Dave

Using Microsoft Excel 2003...

I am working on creating an "IF" Function and here is what I would like for
it to do.
I have Column A filled in with all these ID's that start with either TRE or
CL.
In Column B I would like an if function that will T if the info in Column A
begins with TRE and C if it begins with CL.

Thanks
 
J

joeu2004

In Column B I would like an if function that will T
if the info in Column A begins with TRE and C if it
begins with CL.

The simplest formula might be:

=left(A1,1)

But that assumes that A1 contains only "TRE..." or "CL...", or you
don't really care.

A more careful formula might be:

=if(left(A1,2)="CL","C",if(left(A1,3)="TRE","T",""))


----- original posting -----
 
D

David Biddulph

If those are the only 2 options, =LEFT(A2) and copy down (unless you
*really* insist on using IF).
 
Top