Question for about using IF formula LEFT function at the same time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can the LEFT text function be used in an IF formula?

For example:

Instead of =IF(F7<G7,"SEA","SF") how would this work?
=IF(F7<G7,"=LEFT(C6,3)","=LEFT(C5,3)")

Instead of getting Sea or San as my result, I get EFT(C6,3)

What am I missing?

Thanks in advance.
 
Hi

Just remove the double quotes and the extra = signs

=IF(F7<G7,LEFT(C6,3),LEFT(C5,3))

If F7 were not less than G7 however, you result would be the equivalent
of "SF " i.e. there would be a trailing space after the SF, if the
contents of C5 were only SF. Otherwise, it would also give you the third
character in that cell.

This might give you a problem later if you were trying to compare
whether that cell was equal to "SF", as it would not be so.
 
Thank you, Roger.

That did it.

I do hate it when I make things more complicated than they need to be :-)
 

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

Back
Top