none
Formula to Set value for a cell based on condition

    Question

  • Hi All,

       I have Column with name LasValidateState and it has 4 types options "Success,Fail,Cancel,null" .

         I wan to create the new column with name Validate and set the value 1 for success and 0 for remaining 3(Fail,Cancel,Null).

    Can any one help me how can I do this in Pivot and as well as in Excel Sheet


    Thanks,

    Sid

    • Edited by siddiqali Monday, June 09, 2014 9:34 AM
    Monday, June 09, 2014 9:34 AM

Answers

  • =IF([LasValidateState] = "Success", 1, 0)

    or if you wanted to specify each one then (Depending on if your null is a null or actually text):

    =SWITCH([LasValidateState] , "Success", 1, "Fail", 0, "Cancel", 0, "Null", 0)

    =SWITCH([LasValidateState] , "Success", 1, "Fail", 0, "Cancel", 0, BLANK(), 0)

    Regards

    Monday, June 09, 2014 10:51 AM