View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
KC hotmail com> KC hotmail com> is offline
external usenet poster
 
Posts: 57
Default Formula help needed

If EX is always the first 2 or last 2 letters of the code, then this should
work for C:
=IF(OR(LEFT(A1,2)="EX",RIGHT(A1,2)="EX")),B1,"")
If ENT is always the first 3 letters, then this can be used in D:
=IF(LEFT(A1,3)="ENT",B1,"")
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"Jeremy" wrote:

I am looking for a formula to place what is in B in either C or D based off
of if A has an EX or ENT in it. EX goes in C where ENT goes in D. Below the
first example is what I have and the second is what I would like.

Thank you



A B C D
1 CGVEHEX 1500
2 ENTB2A0 2500
3 EX NM51B1A1 2600
4 ENT W NM 2780

Example 2
A B C D
1 CGVEHEX 1500 1500
2 ENTB2A0 2500 2500
3 EX NM51B1A1 2600 2600
4 ENT W NM 2780 2780