Forum Discussion

Chandrakanth K's avatar
Chandrakanth K
Copper Contributor
Aug 28, 2018
Solved

how to treat the null

Hello All,

 

I need help in comparing two columns and find out if its match or mismatch.

And I need to exclude the amount which is in credit and I need to exclude blank cells in Column B & C.

The current formula I have used is =IF(B2=C2,"","Mismatch"). In This I need to add formula to excluded blank values in B2 & C2 and also need to exclude amount which is in credit. Please help.

 

Regards,

Chandrakanth.K

  • Hi,

     

    If you mean to exclude if any of B or C is blank when it could be

    =IF((A2>0)*LEN(B2)*LEN(C2)*(B2<>C2),"Mismatch","")

    and attached

5 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Hi,

     

    If you mean to exclude if any of B or C is blank when it could be

    =IF((A2>0)*LEN(B2)*LEN(C2)*(B2<>C2),"Mismatch","")

    and attached

    • Chandrakanth K's avatar
      Chandrakanth K
      Copper Contributor

      Thank you. This will help.

      How do I add trim condition for B2 & C2 in the same formula?

       

      Regards,

      Chandrakanth.K

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        If you mean to remove all spaces you may use TRIM(B2) and TRIM(C2) instead of B2 and C2

Resources