LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
KeenKiwi
 
Posts: n/a
Default Sum product of many pairs of columns

Excel 2002.
I have already implemented 2 great solutions from this forum in my project,
but am going round in circles on the final element.
A macro pulls several ranges of information from a named worksheet in each
file in a specified folder, and deposits it in columns in a new workbook.

In the consolidation worksheet:-

Cell K1 is account name.
Cell K2 is account number
Cell K3 is "Bal"
Cell K4:K33 contains the daily balance (30 days in April) e.g. 72758.19
Cell L3 is "Rate"
Cell L4:L33 contains the daily interest rate e.g. 0.0575

This is repeated numerous times, so M1:N33 relates to a different account
and so on. The daily balance and rate potentially are unique for each account
and change daily.

In A4 I have =SUMPRODUCT(($K$3:$GH$3="Bal")*($K4:$GH4<=0),($K4: $GH4)), which
sums all the negative balances for 1 April, and B4 does the same for positive
balances.

In C4 and D4 I want to show the sum of the interest products on negative and
positive balances respectively, for 1 April. This can be crudely expressed
as:-

=SUM(IF(K4<=0,K4*L4/365,0),IF(M4<=0,M4*N4/365,0)...IF(GG4<=0,GG4*GH4/365,0))

I've seen a few ideas that come close to doing this elegantly, for example
using combinations of sumproduct, mod, column, offset and others I can't
recall, but can't figure it out.

Help from the experts will be hugely appreciated.
 
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
Adding columns w/new formulas BUT keeping subtotals Exceldawg Excel Discussion (Misc queries) 0 April 19th 06 02:58 PM
How do I wrap Excel columns in a printout? R2 Excel Discussion (Misc queries) 1 April 1st 06 09:47 AM
filtering unique in multiple columns umniy Excel Worksheet Functions 4 March 9th 06 01:06 PM
filter on pivot table jigio Excel Discussion (Misc queries) 4 August 28th 05 06:19 PM
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM


All times are GMT +1. The time now is 08:58 PM.

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"