"if" statement help... please!!??

  • Thread starter Thread starter nikki
  • Start date Start date
N

nikki

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"..
 
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
 
OOOPS, forgot the quotes..........see Pete's answer

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

Vaya con Dios,
Chuck, CABGx3
 
Hi Chuck,

Google Groups has been acting up for a week or so and is not showing
all posts - I can see your earlier posting by using OE, but not
through this portal (which I've gotten used to, so tend to use most
often), so this posting of yours was a bit of a surprise.

I nearly missed the quotes myself !! <bg>

Pete
 
Yeah, that's what I get for not testing........gotta remember, TEST, TEST,
TEST!!!

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top