Forum Discussion

ubga8hds's avatar
ubga8hds
Copper Contributor
Jun 14, 2024

Some sort of a sumif formula

Hello,

 

I have an issue with a formula i can't figure out how to make it work,

 

My goal is to apply a summ in a cell (A1 equals A2 for example) but ONLY if 2 specific cells have any data inside, text, numbers, summs, etc,

 

for example, A3 equals A2 ONLY if A2 and A1 have text/data/formula inside.

 

What would the formula be ? 

    • ubga8hds's avatar
      ubga8hds
      Copper Contributor

      Hi,

       

      Thank you for your answer, however, it doesnt work,

       

      The already existing formula on my excel sheet is the following : =IF($C252="BE";$M252;0)

       

      C252 is one of the conditions of the formula, but it's specific text, "BE", and i'd like to be "not blank" and  to be detected in a range of cells, for example, A252 to D252, is it possible ?

       

      Best regards, 

      • Martin_Angosto's avatar
        Martin_Angosto
        Iron Contributor

        ubga8hds 

         

        Hi, thank you for the clarification.

         

        Try using this instead:

         

        =IF(NOT(OR(ISBLANK(A252:D252))),$M252,0)

         

        This returns the value in M252 when range A252:D252 is entirely not blank. That is, when all cells within that range are not empty. If you wanted to return the value M252 whenever at least one cell in that range is not blank (but others may be), then replace OR() with AND().

         

        Hope this helps.

         

        Martin

Resources