I have an excel sheet that needs to calculate the sum of values. Values can be in one of two fields, and if it is in the second one, I want to disregard the first one.
Row1: Default value | Override Value Row2: 1 | 2 Row 3: 4 | no value entered Row 4: 0 | 6 Subtotal of Values=12
If Override value is populated, then include that number, and not the Default Value in the subtotal. If Override value is not populated, then include the Default value in the Subtotal.
I need to use Subtotal 109 because I have fields that are sometimes hidden.
Is it possible to do this with a formula directly within the excel spreadsheet, and not using and VBA code?
=SUMIF(B1:B3,"",A1:A3) + SUMIF(B1:B3,"<>",B1:B3)
To account for hidden fields as well maybe try this:
(eg hiding second row gives 8)