Technology Get the latest on technology, electronics and software…

Excel table formula help

Thread Tools
 
Old 01-11-2011, 02:47 AM
  #1  
I don't have a Ferrari in
Thread Starter
 
mastertl's Avatar
 
Join Date: May 2004
Location: Southern California
Posts: 3,437
Likes: 0
Received 2 Likes on 1 Post
Excel table formula help

C7p6w.jpg

I'm trying to get the Cumulative Column to run a continuous total and I'm able to get it to work assuming there are no blank rows. As soon as there is a blank row, the formula goes to shits. I'd like both the Total and Cumulative column to return null cells if there are no numbers, but if there is a completely empty row, is there a way to make the Cumulative column search vertically in the column to continue adding?

My current formulas (I know they are not elegant, I suck...)

For Total: =IF(SUM(C3:E3)>0,SUM(C3:E3),"") [This would be for Cell F3]

For Cumulative: =IF(F3="","",IF(F3>0,(F3+G2),)) [This would be for Cell G3]

If I skip a line, I get the #VALUE! error. Any ideas?
Old 01-11-2011, 05:32 AM
  #2  
Drifting
iTrader: (1)
 
rza49311's Avatar
 
Join Date: Feb 2006
Location: Southern VA
Age: 45
Posts: 3,072
Received 8 Likes on 6 Posts
sounds like you need to nest that inside an IF with an IsError test.
Old 01-11-2011, 07:32 AM
  #3  
Drifting
 
te3point5's Avatar
 
Join Date: Sep 2004
Location: Seattle, WA
Age: 42
Posts: 3,474
Received 113 Likes on 69 Posts
Why don't you do:

in Cell G2: =sum($F$2:F2)

Then drag down
Old 01-11-2011, 07:38 AM
  #4  
Team Owner
 
svtmike's Avatar
 
Join Date: Oct 2003
Location: Chicago
Age: 60
Posts: 37,666
Received 3,864 Likes on 2,031 Posts
Originally Posted by mastertl
For Total: =IF(SUM(C3:E3)>0,SUM(C3:E3),"") [This would be for Cell F3]

For Cumulative: =IF(F3="","",IF(F3>0,(F3+G2),)) [This would be for Cell G3]

If I skip a line, I get the #VALUE! error. Any ideas?
The "" are what is causing you trouble.

Get rid of them and replace them with these simple formulas:

Total: =SUM(C2:E2) and fill down

Cumulative: =SUM(F$2:F2) and fill down

Go to Excel Options->Advanced, under the "Display Options for this Worksheet", uncheck "Show a zero in cells that have zero value".
Old 01-11-2011, 11:08 AM
  #5  
AZ Community Team
 
Bearcat94's Avatar
 
Join Date: May 2007
Location: N35°03'16.75", W 080°51'0.9"
Posts: 32,488
Received 7,771 Likes on 4,342 Posts
What they said.

Think of this way: If you have a blank row, the value for that day is "0". Your cumulative amount, including that day, is the previous cumulative amount + 0.

IOW - just let the cumulative amount tally on those blank rows.
Old 01-11-2011, 10:14 PM
  #6  
Old Man Yelling at Clouds
 
1Louder's Avatar
 
Join Date: Apr 2007
Location: Seattle, WA
Age: 57
Posts: 16,973
Received 7,362 Likes on 3,906 Posts
What they said too.

I think the #Value is coming from not setting a value if F3<=0:

IF(F3="","",IF(F3>0,(F3+G2),))

Because you are triggering that condition, which is leaving some null value in G6 and then you're trying to add it in G7. If you did this:

IF(F3="","",IF(F3>0,(F3+G2),0))

It would work, but you'd have a zero in the cell.
Old 01-11-2011, 10:21 PM
  #7  
Team Owner
 
svtmike's Avatar
 
Join Date: Oct 2003
Location: Chicago
Age: 60
Posts: 37,666
Received 3,864 Likes on 2,031 Posts
Originally Posted by 1Louder
What they said too.

I think the #Value is coming from not setting a value if F3<=0:

IF(F3="","",IF(F3>0,(F3+G2),))

Because you are triggering that condition, which is leaving some null value in G6 and then you're trying to add it in G7. If you did this:

IF(F3="","",IF(F3>0,(F3+G2),0))

It would work, but you'd have a zero in the cell.
What's happening is the "" used as the result of the IF() functions is setting up a string value in some of the cells, which the SUM() function doesn't handle -- it throws a #VALUE error instead.

I just went through an extensive redesign of a large spreadsheet to eliminate this very problem.
Old 01-12-2011, 02:31 AM
  #8  
I don't have a Ferrari in
Thread Starter
 
mastertl's Avatar
 
Join Date: May 2004
Location: Southern California
Posts: 3,437
Likes: 0
Received 2 Likes on 1 Post
The SUM formula worked perfectly. I think I was thinking too hard about how to make the table work. Its much simpler than what I originally had in mind.

I ended up using this in G2 and dragged down.

=IF(F2="","",SUM($F$2:F2))

The problem with unchecking the show zeroes option is that I'm not sure if it would show up when I send the spreadsheet out.

Y'all are some Excel pros
Old 01-12-2011, 07:39 AM
  #9  
Team Owner
 
svtmike's Avatar
 
Join Date: Oct 2003
Location: Chicago
Age: 60
Posts: 37,666
Received 3,864 Likes on 2,031 Posts
Originally Posted by mastertl
The problem with unchecking the show zeroes option is that I'm not sure if it would show up when I send the spreadsheet out.
That setting will stay with the spreadsheet, so it will work when you send it out.
Old 01-12-2011, 12:52 PM
  #10  
Old Man Yelling at Clouds
 
1Louder's Avatar
 
Join Date: Apr 2007
Location: Seattle, WA
Age: 57
Posts: 16,973
Received 7,362 Likes on 3,906 Posts
Originally Posted by mastertl
The SUM formula worked perfectly. I think I was thinking too hard about how to make the table work. Its much simpler than what I originally had in mind.

I ended up using this in G2 and dragged down.

=IF(F2="","",SUM($F$2:F2))

The problem with unchecking the show zeroes option is that I'm not sure if it would show up when I send the spreadsheet out.

Y'all are some Excel pros
Another alternative to "show zeros" - If you ever want to get around that (or having to put strings in your cells), but don't want zeros showing up, what you can do is have your IF statements populate cells with a zero (or make it some bizarre number that would never happen, like -9999). And then set conditional formatting on the cell to turn the font white when the cell equals that value. It's not too much work and it's a good way to make unwanted place-holder data "disappear" on print outs.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
knight rider
Car Talk
9
03-04-2016 08:59 AM
08_UA7_Gr33k
Member Cars for Sale
13
02-11-2016 02:17 PM
InFaMouSLink
Non-Automotive & Motorcycle Sales
2
11-11-2015 12:19 PM
InFaMouSLink
Car Parts for Sale
6
10-27-2015 06:52 PM
08_UA7_Gr33k
Member Cars for Sale
1
09-27-2015 01:56 PM



Quick Reply: Excel table formula help



All times are GMT -5. The time now is 03:53 PM.