Share via

Do nothing function

Anonymous
2022-10-14T14:03:52+00:00

How can I create the function IF a (b, do nothing)?

Microsoft 365 and Office | Excel | For home | Windows

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

4 answers

Sort by: Most helpful
  1. Anonymous
    2022-10-15T11:59:10+00:00

    Thanks, Hans
    I think I have to fund another solution.

    S.R

    0 comments No comments
  2. HansV 462.6K Reputation points MVP Volunteer Moderator
    2022-10-15T09:44:04+00:00

    That is not possible, The moment you enter a formula in a cell, you overwrite its value.

    It could be done using VBA code, but that has two disadvantages:

    • It would disable Undo for that cell.
    • All users would have to allow macros.

    Let me know if you still want that.

    Alternatively, use a, b, c and d.

    a and b are as before, c contains the value you want to return if a is not true.

    In cell d: =IF(a, b, c)

    0 comments No comments
  3. Anonymous
    2022-10-15T09:20:31+00:00

    Hans, thank you for the quick reply.
    The "" is not "do nothing", but "clear the cell" or "write nothing". "Do nothing" I means "remain the value of the cell as is"

    Regards

    S. R.

    0 comments No comments
  4. HansV 462.6K Reputation points MVP Volunteer Moderator
    2022-10-14T14:12:57+00:00

    =IF(a, b, "")

    0 comments No comments