Google-sheets – Google Sheets IF function

google sheets

I want to make a function with the following criteria:

  • if A2 is equal to A1 -> Text 1
  • if A2 is empty -> Text 2
  • if A2 is not empty and not equal to A1 -> Text 3

Something like connecting these two functions into one:

=if(A2=A1,"Text1","Text3")
=if(isblank(A2),"Text2")

Thanks for help in advance!

Best Answer

All you need to do is combine your two formulas:

=if(isblank(A2),"Text2",if(A2=A1,"Text1","Text3"))