Thread: Adding Prefix
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Adding Prefix

If telephone numbers are text, try:

=IF(LEFT(A1)="6","4255"& RIGHT(A1,4),"")


"Freshman" wrote:

Dear all,

Suppose I want to input an extension number (e.g. 61151) in cell A1 then I
want a full telephone number appears in B1. Our telephone prefix is 4255 so
the full telephone number should be 4255 1151. My formula in B1 is:

=IF(LEFT(A1)=6,"4255"&RIGHT(A1,4),"")

Why I use LEFT(A1)=6 becuase I have another set of extension numbers start
with 4. However, the result of the above formula returns a blank cell. Where
is the mistake? Please kindly advise.

Thanks & regards.