Share via

Error - There's a problem with this formula

Anonymous
2023-10-05T11:47:55+00:00

Hi, I am using below formula, if the item starts with "7" than result should be "0" if not "1" for level 0 & 1 but I am getting an error, please help me to fix it. Thanks in advance.

=if(And(A2="0","1",if(left(B2,1)<>"7)"),"1","0"))

Microsoft 365 and Office | Excel | For education | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2023-10-05T13:36:31+00:00

=IF(OR(A2="",B2=""),0,IF(A2=0,1,IF(LEFT(B2,1)<>"7",1,0)))

Or

=IF(OR(A2="",B2=""),"",IF(A2=0,1,IF(LEFT(B2,1)<>"7",1,0)))

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-10-05T13:28:27+00:00

    Hi, thanks for the reply. Even if Column "A" is blank formula is picking "1". its should be 0 if no data in column "A", can you please help me on this. Thanks

    Was this answer helpful?

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2023-10-05T12:10:02+00:00

    =IF(A2=0,1,IF(LEFT(B2,1)<>"7",1,0))

    Was this answer helpful?

    0 comments No comments