7

Is it possible to test for integers or strings in a Google Spreadsheet and respond to each differently?

  • Did you find any of the answers given useful? – Jacob Jan Tuinstra Mar 13 '14 at 11:07
6

To test for string you can use =ISTEXT(A1)

To test for an Integer you will need to do something like this:

=IF( (D8 = int(D8)), TRUE, FALSE)

Which basically converts the value to an Integer and then checks if it is the same as the original pre-converted value.

| improve this answer | |
  • 1
    I think =D8=int(D8) will do. (not tested) – wilson Feb 23 '11 at 8:23
  • @Wilson - Yes you are correct :) – codingbadger Feb 23 '11 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.