AND function

Copper Contributor

I have this issue when i use the AND function it gets all false values when i put this and of course i have values in between

 

=AND(K6>=70157,K6<70176)

 

This was just my first try on this function and went bad.

 

Trim #VALI
70157FALSE
70158FALSE
70162FALSE
70160FALSE
70163FALSE
70164FALSE
70166FALSE
70165FALSE
70167FALSE
70170FALSE
70169FALSE
70175FALSE
70176FALSE
70186FALSE
2 Replies

@SaintSebas 

Most probably your Trim # column is formatted as text or you have text values in proper formatted column. Try =ISTEXT(K6) in any empty cell.

@SaintSebas 

 

The only reason this isn't working is maybe because the Trim# column is formatted as Text i.e. the numbers in there look like Numbers but actually Numbers as Text as pointed out in other reply.

 

You have two options here to make your formula to work...

 

  1. You convert your Numbers entered as Text as Real Numbers. To do so, select all the numbers in Trim# column, go to Data Tab --> Text to Columns --> Click on Finish in the first step. And as a result your numbers will be converted as real numbers and your formula will start working.
  2. If you don't want to change anything with your data, you may tweak your formula to =AND(K6+0>=70157,K6+0<70176). Adding 0 to K6 (K6+0) or multiplying K6 with 1 (K6*1) will change the number in K6 to a real number. In other words, if a number is entered as a Text, you can perform a mathematical operation on that number and in this case adding a zero or multiplying the number by 1 doesn't change it's value but then you can compare it with another real number as you are doing in your formula.