#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Sum a column

Col A Result of Formula
1 0 0
2 7.5 7.5
3 0 0
4 0 0
5 9 9
6 9.5 18.5
7 10 28.5
8 0 0

This is a partial list of a driver log sheet. Column A is hours driven each
day. I'm trying to create a formula that will sum the numbers in column A
backward, or up, to where the previous number is zero and then stop. I was
thinking an IF stmt, but I'm stuck on how to sum upward and then stop when
the cell value is 0.

example: IF(A1=0,"0",sum upward until Ax=0). I don't know what to do for
"sum upward until Ax=0" or if its even possible.

Thanks,
Stefanie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Sum a column

For Cell B1, you'd just use =A1. Then try this, starting with Cell B2:

=IF(A2=0,0,B1+A2)

Copy down as needed.

HTH
Elkar


"Stefanie" wrote:

Col A Result of Formula
1 0 0
2 7.5 7.5
3 0 0
4 0 0
5 9 9
6 9.5 18.5
7 10 28.5
8 0 0

This is a partial list of a driver log sheet. Column A is hours driven each
day. I'm trying to create a formula that will sum the numbers in column A
backward, or up, to where the previous number is zero and then stop. I was
thinking an IF stmt, but I'm stuck on how to sum upward and then stop when
the cell value is 0.

example: IF(A1=0,"0",sum upward until Ax=0). I don't know what to do for
"sum upward until Ax=0" or if its even possible.

Thanks,
Stefanie

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Sum a column

Thanks! I was trying to make it more difficult than it was. Stefanie

"Elkar" wrote:

For Cell B1, you'd just use =A1. Then try this, starting with Cell B2:

=IF(A2=0,0,B1+A2)

Copy down as needed.

HTH
Elkar


"Stefanie" wrote:

Col A Result of Formula
1 0 0
2 7.5 7.5
3 0 0
4 0 0
5 9 9
6 9.5 18.5
7 10 28.5
8 0 0

This is a partial list of a driver log sheet. Column A is hours driven each
day. I'm trying to create a formula that will sum the numbers in column A
backward, or up, to where the previous number is zero and then stop. I was
thinking an IF stmt, but I'm stuck on how to sum upward and then stop when
the cell value is 0.

example: IF(A1=0,"0",sum upward until Ax=0). I don't know what to do for
"sum upward until Ax=0" or if its even possible.

Thanks,
Stefanie

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
divide column(x) by column(y) to give column(x/y) in excel? James New Users to Excel 2 April 24th 23 11:46 AM
Referencing date column A & time column B to get info from column TVGuy29 Excel Discussion (Misc queries) 1 January 24th 08 09:50 PM
Return text in Column A if Column B and Column K match jeannie v Excel Worksheet Functions 4 December 13th 07 07:36 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look [email protected] Excel Discussion (Misc queries) 1 December 27th 06 05:47 PM
Divide Column A by Column B multiply Column C Stumped Excel Worksheet Functions 3 December 28th 05 05:51 AM


All times are GMT +1. The time now is 12:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"