Forum Discussion

rehanmaqbul's avatar
rehanmaqbul
Copper Contributor
Feb 06, 2022
Solved

Blank value in Cell

Hi, I have a problem calculating. I have a column containing three types of values i.e. Yes, No, and a blank cell. I am creating two columns of Yes & No. In the cell, I write the formula (=if(a1="Yes",1,0), in the next column I write (=if(a1="No",1,0). There are many blank cells in A1. The problem is in the "No" column it also shows 1 against a blank column and I don't want that. I want a blank cell.

 

Can anybody help? I will be gratefull.

  • rehanmaqbul 

    For the Yes column enter:

    =IF(ISBLANK(A1),"",--(A1="Yes"))

     

    For the No column enter:

    =IF(ISBLANK(A1),"",--(A1="No"))

     

    And copy the formulae down.

4 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    rehanmaqbul 

    For the Yes column enter:

    =IF(ISBLANK(A1),"",--(A1="Yes"))

     

    For the No column enter:

    =IF(ISBLANK(A1),"",--(A1="No"))

     

    And copy the formulae down.

    • rehanmaqbul's avatar
      rehanmaqbul
      Copper Contributor
      Thank you, Riny for the great solution. it worked though Mr. Nikolino's solution was also correct your's was easier. Thank you Sir, So nice of you.
    • rehanmaqbul's avatar
      rehanmaqbul
      Copper Contributor
      Thank you. It worked but Riny_van_Eekelen solution is easier to implement. Thank you very much. I really appreciate it.