New Contributor

# IF statement and substracting or adding cells

I am trying to figure out a formula I can use that will be able to add or substract 2 cells and return the value of one specified cell if one of the two cells being added or subtracted is blank. In the attached work sheet (Batch Charge Worksheet-2.0:  the example would be Cell K12= value of cell J12 if I12 is blank otherwise K12= value of J12-I12. This formula needs to work for all cells listed in column K.

4 Replies

# Re: IF statement and substracting or adding cells

@Josephdye I assume you are referring to cell K12 in the sheet called "Charge Worksheet with Calcs (3)".

Note that cells in column I contain a formula (column E minus column H). The outcome may be zero but will never be blank. The formula you ask for would be like =IF ( I12 = "" , J12 , J12-I12 ). And J12 minus zero = J12. So, what's the point?

# Re: IF statement and substracting or adding cells

@Riny_van_Eekelen  The question I am asking is as follows:

I need Cell K12 to return the value of J12 if I12 is blank.

If I12 is not blank and contains a value, I need K12 to return the value of J12 - I12.

# Re: IF statement and substracting or adding cells

The Work sheet is Batch Charge Worksheet-2.0

# Re: IF statement and substracting or adding cells

@Josephdye There's no such worksheet in your file!