View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default "if" statement help... please!!??

RIGHT(B1,1) will return the last character of B1, so you could write:

=IF(RIGHT(B1,1)="7",B1+4,B1+11)

Note that RIGHT returns a string - hence the quotes.

Hope this helps.

Pete

On Feb 7, 3:04*pm, nikki wrote:
anyone know if you can write in an if statement "=if(B1"ends with a 7",B1+4,
B1+11)??? I don't know how to say "ends with a 7"..
--
nikki