IF statement and substracting or adding cells

%3CLINGO-SUB%20id%3D%22lingo-sub-2573107%22%20slang%3D%22en-US%22%3EIF%20statement%20and%20substracting%20or%20adding%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2573107%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20figure%20out%20a%20formula%20I%20can%20use%20that%20will%20be%20able%20to%20add%20or%20substract%202%20cells%20and%20return%20the%20value%20of%20one%20specified%20cell%20if%20one%20of%20the%20two%20cells%20being%20added%20or%20subtracted%20is%20blank.%20In%20the%20attached%20work%20sheet%20(Batch%20Charge%20Worksheet-2.0%3A%26nbsp%3B%20the%20example%20would%20be%20Cell%20K12%3D%20value%20of%20cell%20J12%20if%20I12%20is%20blank%20otherwise%20K12%3D%20value%20of%20J12-I12.%20This%20formula%20needs%20to%20work%20for%20all%20cells%20listed%20in%20column%20K.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2573107%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2573721%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20statement%20and%20substracting%20or%20adding%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2573721%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1109552%22%20target%3D%22_blank%22%3E%40Josephdye%3C%2FA%3E%26nbsp%3BI%20assume%20you%20are%20referring%20to%20cell%20K12%20in%20the%20sheet%20called%20%22Charge%20Worksheet%20with%20Calcs%20(3)%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%20that%20cells%20in%20column%20I%20contain%20a%20formula%20(column%20E%20minus%20column%20H).%20The%20outcome%20may%20be%20zero%20but%20will%20never%20be%20blank.%20The%20formula%20you%20ask%20for%20would%20be%20like%20%3CSTRONG%3E%3DIF%20(%20I12%20%3D%20%22%22%20%2C%20J12%20%2C%20J12-I12%20)%3C%2FSTRONG%3E.%20And%20J12%20minus%20zero%20%3D%20J12.%20So%2C%20what's%20the%20point%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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

@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?

 

@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.

The Work sheet is Batch Charge Worksheet-2.0

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