add/subtract formula account empty rows

Manolocs

Active Member
Joined
Mar 28, 2008
Messages
340
Columns A, B and C have search formula to find in a table the element in B1.
column D is a simple add/subtract formula.
Problem when the row is empty "", the formula got Error.
Is there a way to use this formula and skip the empty row and preserve the last balance?
Thanks in advance.

ABCDERROR
1Select Product = pen
2
3ProductAmountTaxBalance
40
5pen10.10=d2+B3-C3
6=d3+B4-C4#VALUE]
7pen=d4+B5-C5#VALUE]
8#VALUE]
9pen#VALUE]
10#VALUE]
11#VALUE]
12pen

<tbody>
</tbody>
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
You are referencing cell D3, which contains a word, "Balance". This text cannot be converted to a number, so cannot be included in a mathematical operation. This is what generates the error message #VALUE because it is trying to subtract non-convertible text. Please review your formulas to make sure they are referencing the cells you actually want to work on.
 
Last edited:
Upvote 0
sorry was my mistake... I added rows and did not change the formula....
but the formula is correct my question is in case of empty row how can I calculate using this formula.
I can not edit the table.
 
Last edited:
Upvote 0
You can use the IFERROR(x, y) Excel function to handle error returns. If the first argument does not give an error, then it returns that value. If the first argument gives an error, return the second result instead.
Code:
=IFERROR(D2+B3-C3, D2)
This will calculate D2+B3-C3. If that results in an error, usually because B3 or C3 contains non-convertible text, then it just reports D2 (the second argument). Drag this formula down with the cell button or copy and paste to the other cells in D column.
 
Upvote 0

Forum statistics

Threads
1,215,086
Messages
6,123,040
Members
449,092
Latest member
ikke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top