Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Excel "IF" Formula Help?

I need a formula that calculates if there is text in A1&B1 than C1=2

If there is only text in A1 than C1= 1.

Any help you could provide is appreciated. Thanks!

4 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    this formula in cell C1 should do the trick:

    =IF(LEN(A1)>0,1,0) + IF(LEN(B1)>0,1,0)

  • Anonymous
    1 decade ago

    so my question what if B1 has a number...that isn't text...

    I need to know if you mean blank, instead of no text

    try this

    =IF(OR(A1="",B1=""),"1","2")

  • 1 decade ago

    =counta(a1:b1)-count(a1:b1)

  • 1 decade ago

    =IF(A1<>"",IF(B1<>"",2,1), 0)

    0 is like both null..

    Source(s): used excel a lot
Still have questions? Get your answers by asking now.