Forum

Notifications
Clear all

Count >0 cells in dollars -- get Divide#0 error

2 Posts
2 Users
0 Reactions
17 Views
(@tasmoot)
Posts: 1
New Member
Topic starter
 

I have a table where I want to count the number of cells in a row that have a value greater than 0 (zero).    The columns represent 401K accounts that are being drawn from every year for ROTH Conversions and RMDs.   What I want to do is pick a standard amount every year, then divide that number by the remaining accounts to withdraw evenly from each account.   In my table when the account drains below zero, COUNTIF winds giving me #DIV/0! errors instead of dividing by the accounts that are above $0.

You can see an example of the formula below.  What trigger the error is the Number of Pre-Tax Accounts /[@[No Pre-Tax Accounts]]), where that column is a COUNTIF formlua

# This is the content of the column: "[No Pre-Tax Accounts]]" 

=COUNTIF(Table1[@[Account1]:[Account4],">0").  

# This is the formula from one of the other columns that get's the error message:

=IF(I26<=0,0,
IF(AND([@[Account1]<=0,I26<=0),0,
IF(AND([@[Account1]<=0,I26>0),
(I26+SUM(H27,((-[@[Roth Conversion]]+-[@RMDs])/[@[No Pre-Tax Accounts]]),[@[Income Taxes]],[@[Vanguard Transfer]],[@[Investment Taxes]]))*(1+Investment_Growth),
(I26-(([@[Roth Conversion]]+[@RMDs])/[@[No Pre-Tax Accounts]]))*(1+Investment_Growth))))

 

Is there another function that would work better?

Thanks for any assistance!


This topic was modified 7 hours ago by Thomas Smoot
 
Posted : 27/07/2026 9:35 am
Riny van Eekelen
(@riny)
Posts: 1452
Member Moderator
 

@tasmoot

Please upload your file with some fake but realistic data. It's difficult to help otherwise. What's in I26 and H27, for instance?


 
Posted : 27/07/2026 2:19 pm
Share:
0