Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
c_schear
 
Posts: n/a
Default Sum Up Numbers w/o Breaks


Heres kinda how my spreadsheet looks:

Code:
--------------------

A B C D
1. Disc Cost Adj Result
2. Sample1 $1.00 -1 -$1.00
3. Sample2 $5.00 -5 -$25.00
4. Sample3 $1.00 -1 -$1.00
5.
6. Sample1 $1.00 -1 -$1.00
7. Sample1 $1.00 -1 -$1.00
8.

--------------------


What I need is all the cells in row "D" to multiply C*B (easy), but if
there is nothing in C, then I need it to sum up the values in D (from 1
above it to the next break in numbers). So D5 would = -$27.00, and D8
would = -$2.00. This is what I have come up with so far (D5):


Code:
--------------------
=IF(C5="",IF(C4="","", ???),C5*B5)
--------------------


Any ideas?


--
c_schear
------------------------------------------------------------------------
c_schear's Profile: http://www.excelforum.com/member.php...o&userid=16494
View this thread: http://www.excelforum.com/showthread...hreadid=278720

  #2   Report Post  
hgrove
 
Posts: n/a
Default


c_schear wrote...
Heres kinda how my spreadsheet looks:

A B C D
1 Disc Cost Adj Result
2 Sample1 $1.00 -1 -$1.00
3 Sample2 $5.00 -5 -$25.00
4 Sample3 $1.00 -1 -$1.00
5
6 Sample1 $1.00 -1 -$1.00
7 Sample1 $1.00 -1 -$1.00
8.

What I need is all the cells in row "D" to multiply C*B (easy), but if

there is
nothing in C, then I need it to sum up the values in D (from 1 above

it to the
next break in numbers). So D5 would = -$27.00, and D8 would = -$2.00.

. . .
...

If you want the same formulas for all cells in column D from cell D2
down, try

D2:
=IF(ISNUMBER(C2),B2*C2,SUM(INDIRECT("R"&
LOOKUP(2,1/(1-ISNUMBER(C$1:C1)),ROW(C$1:C1)+1)&"C:R[-1]C",0)))

filled down as far as needed.


--
hgrove
------------------------------------------------------------------------
hgrove's Profile: http://www.excelforum.com/member.php...o&userid=11432
View this thread: http://www.excelforum.com/showthread...hreadid=278720

  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
try the following formulas
D1:
=B1*C1
D2:
=IF($C2<"",$B2*$C2,SUM(OFFSET($D1,0,0,-ROW()+1+SUMPRODUCT(MAX(($C$1:$C
1="")*ROW($C$1:$C1))))))

and copy this down

--
Regards
Frank Kabel
Frankfurt, Germany

"c_schear" schrieb im
Newsbeitrag ...

Heres kinda how my spreadsheet looks:

Code:
--------------------

A B C D
1. Disc Cost Adj Result
2. Sample1 $1.00 -1 -$1.00
3. Sample2 $5.00 -5 -$25.00
4. Sample3 $1.00 -1 -$1.00
5.
6. Sample1 $1.00 -1 -$1.00
7. Sample1 $1.00 -1 -$1.00
8.

--------------------


What I need is all the cells in row "D" to multiply C*B (easy), but

if
there is nothing in C, then I need it to sum up the values in D (from

1
above it to the next break in numbers). So D5 would = -$27.00, and D8
would = -$2.00. This is what I have come up with so far (D5):


Code:
--------------------
=IF(C5="",IF(C4="","", ???),C5*B5)
--------------------


Any ideas?


--
c_schear
---------------------------------------------------------------------

---
c_schear's Profile:

http://www.excelforum.com/member.php...o&userid=16494
View this thread:

http://www.excelforum.com/showthread...hreadid=278720


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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Sorting when some numbers have a text suffix confused on the tundra Excel Discussion (Misc queries) 5 December 18th 04 10:19 PM
Sorting imported "numbers" Confused on the tundra Excel Discussion (Misc queries) 5 December 17th 04 07:33 PM
Paste rows of numbers from Word into single Excel cell BecG Excel Discussion (Misc queries) 1 December 8th 04 04:55 PM
finding common numbers in large lists Jenn Excel Worksheet Functions 1 November 11th 04 07:42 PM


All times are GMT +1. The time now is 02:24 AM.

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

About Us

"It's about Microsoft Excel"