Excel formula - how to "do nothing"?

Solved
mad77 -  
 mad77 -
Hello,

To avoid a lengthy formula, I would like to know if there is a possibility in Excel to "do nothing".

Actually, I want to avoid the following formula:
=IF(X=0,B1,X) where X is a two-line formula...

So I'm looking for a formula:
=IF(X<>0,"do nothing",B1)

Which would prevent the repetition of X.

Thank you in advance,

2 answers

  1. PtiSwiss Posted messages 100 Registration date   Status Member Last intervention   37
     
    Hello

    Could you provide more details regarding the two-line formula?
    Feel free to paste it in a private message if you want me to take a look.
    1
  2. pilas31 Posted messages 1878 Status Contributor 648
     
    Hello,

    But "Doing nothing" means setting the value of X so actually it just inverts the test.

    In reality, the formula is like this

    =IF(X<>0,X,B1)

    So that does not prevent the repetition of the formula X.

    No, in my opinion the only solution is to place the formula X in another cell, let's say in K1, and then we only write the complicated formula X once and write:

    =IF(K1=0,B1,K1)

    Best regards,

    --
    Sincerely,
    0
    1. mad77
       
      Thank you very much, that's the answer I needed ;)

      See you later!
      0