Blank Rows Causing Errors

Steve 1962

Active Member
Joined
Jan 3, 2006
Messages
349
Office Version
  1. 365
Platform
  1. Windows
Hi

I have a VLOOKUP formula in column B which I want to continue to use, with a running total in column D. Problem is when there is blank rows between transactions, causing the Running Total in column D to error. Is there a way to modify column D formula to not error and accommodate the blank rows, keeping the Running Total correct.

Thanks

Steve

Book1
ABCDE
1OutInBalance
2Income 2000#VALUE!Cell D2 to show 2000
3Income 2000#VALUE!Cell D3 to show 4000
4 #VALUE!Cell D4 to show blank
5Expense-400#VALUE!Cell D5 to show 3600
6 #VALUE!Cell D6 to show blank
7Expense-50#VALUE!Cell D7 to show 3550
8 #VALUE!Cell D8 to show blank
9 #VALUE!Cell D9 to show blank
10Expense-25#VALUE!Cell D10 to show 3525
Sheet1
Cell Formulas
RangeFormula
B2:B4, B8:B9, B6B2=IFNA(VLOOKUP(A2,Expense_List,7,FALSE)*-1,"")
D2:D10D2=D1+C2+B2
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
How about to change this formula:
Excel Formula:
=IFNA(VLOOKUP(A2,Expense_List,7,FALSE)*-1,"")
to this:
Excel Formula:
=IFNA(VLOOKUP(A2,Expense_List,7,FALSE)*-1,0)
Then you can apply a number formatting like this to hide zeros:
0;0;;@
 
Upvote 0
Try like this

23 11 22.xlsm
ABCDE
1OutInBalance
2Income20002000Cell D2 to show 2000
3Income20004000Cell D3 to show 4000
4 Cell D4 to show blank
5Expense-4003600Cell D5 to show 3600
6 Cell D6 to show blank
7Expense-503550Cell D7 to show 3550
8 Cell D8 to show blank
9 Cell D9 to show blank
10Expense-253525Cell D10 to show 3525
Steve 1962
Cell Formulas
RangeFormula
D2:D10D2=IF(A2="","",SUM(B$2:C2))
 
Upvote 0
Solution
Thanks very much to Flashbond, RustamMika and Peter. Appreciate the help - all fixed and working fine now.

Extra thanks to Peter who has helped me on many occassions.

Steve
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,084
Messages
6,123,028
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