View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default checking the content of a cell if it starts with certain character

=IF(LEFT(A2,2)="PN",B2*3,"no way")
=IF(LEFT(A2,2)="PN",B2*3,"")

But IF is not needed if you can live with zero when there is no PN
=(LEFT(A2,2)="PN")*(B2*3)

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Timur" wrote in message
...
I want to calculate something if the content of the reference cell begins
with "PN"
I tried to use "if" formula as below ;
if A2=PN# or * but it did not work

I will be gled if somebody help me
thanks
timur