(IF(ISTEXT), "1","0") values, not seen as numbers for a SUM formula, can this be done

  • I need a formula that will do the following:
    If text is in a certain cell display the number 1 if not display the number 2 (I was able to accomplish this with the formula (IF(ISTEXT(A1),"1","0"), after this value is configured, I want to add up the total number of 1s, to display in another cell, I tried to do a simple "=sum(B1:B20)" but the excel is not recognizing the 1 and 0 as numbers (I also tried formatting the cells for numbers but this didn't work either.


    My objective: I want to record and total the number of objects in a collection, I thought each time I entered the name of one of the object in column A, a 1 would populate in the hidden B column, then I'd do a sum of the B column to get my total number of objects.


    My Problem: Sumn does not recognize the IF(ISTEXT) formula value as a number.


    Can my original concept work or should I try another method?


    I've attached a sample file, you may need to unhide the B column.

  • Re: (IF(ISTEXT), "1","0") values, not seen as numbers for a SUM formula, can this be done


    The reason why SUM doesn't recognize your values is because you've enclosed 1 and 0 within quotes. This formats those values as text which SUM ignores. Try the following instead...


    =IF(ISTEXT(A1),1,0)


    Hope this helps!

  • Re: (IF(ISTEXT), "1","0") values, not seen as numbers for a SUM formula, can this be done


    =IF(ISTEXT(A1),1,0) worked perfectly, thank you.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!