Test for Single Character That is in an Array

  • Thread starter Thread starter scallyte
  • Start date Start date
S

scallyte

Cell D116 on my worksheet contains the character "C".

Another cell on the worksheet contains the (non-working) test:

=IF(D116 LIKE "A..L", "yes", "no")

This doesn't work. I want it to return "yes" because the character
"C" is in the array "A..L" but I can't figure out how to do this. I
could accomplish this using VB, but would rather use a worksheet
function.
 
Hi

one way
=IF(D116>=CHAR(65),IF(D116<=CHAR(76),"yes","no"),"no")

Cheers
JulieD
 
Hi
maybe try:
=IF(AND(CODE(D116)>=CODE("A"),CODE(D116)<=CODE("L")),"yes","no")
 

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