Forum Discussion

sarafiore's avatar
sarafiore
Copper Contributor
Feb 07, 2021

- Delete cell content based on a condition -

Hello, 
is there an easy way to delete the content of one cell based on the content of another cell?

For example, if cell A2 content is > 0 , then I want to delet whatever is written in the cell A1.  

Thank you so much in advance!

6 Replies

  • mathetes's avatar
    mathetes
    Silver Contributor

    sarafiore 

     

    An "easy way"? Probably not without a macro of some sort.

     

    Why don't you give a more complete description of what the overall task is, of which that step is just a part. It may be that there is another approach altogether that would accomplish the bigger objective.

    • sarafiore's avatar
      sarafiore
      Copper Contributor

      mathetes 

      I'll try to explain it in the simplest way and I've attached a screenshot for better understanding 🙂

       

      The column "Missing Mat" is the sum of the goods bought or sold in a week and it is calculated through a simple +SUM function.

       

      When stocks go negative, the "Status" column tells me that it is necessary to place a new order for goods: when the "Missing Mat" cell goes negative, the "Status" cell displays the wording "TO ORDER".

       

      To remind me that I placed the order, I write an asterisk next to it. 

       

      The "Status" column is in fact calculated through the +IF function: +IF(Missing Mat<0; and +IF(there is an asterisk, then print "TO ORDER"; if false print "ORDERED"), so that "ORDERED" appears after I write an asterisk.

      ------         +IF(C3<0;+IF(B3="*";"TO ORDER";"ORDERED");"")      ------

       

      What I need is that when the "Missing Mat" cell returns to 0, because I have received the order, the cell containing the asterisk is automatically deleted...

       

      I would be very very very grateful for any help! 

      Thanks in advance.

       

       

       

       

       

       

       

       

Resources