Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default calculating wtd number with conditional array formula

Hello, I have a data set that looks like this:

RATE UNITS
12.00% 0
0.00% 1500
10.00% 6000
20.00% 8000

and I need to calculate a weighted average rate. I need to exclude the row
if either rate or units contain a 0 value.

The result should show a wtd value of 15.71%

my formula is a mess:

={(SUM(IF(AND(UNITS<0,RATES<0),(RATES*UNITS)/(SUM(IF(UNITS<0,UNITS,0))),0)))}

If anyone can help straighten me out, I'd appreciate it. :)

Thank you,

Nacho

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default calculating wtd number with conditional array formula

One way would be to create a third helper column in which you enter the
following formula (assumes your data starts in the 2nd row):
=IF(A2*B2=0,"Ignore","Include" and fill down as necessary.

Then you could filter out the "Ignore"s and run the weighted average.
--
Brevity is the soul of wit.


"nacholibre" wrote:

Hello, I have a data set that looks like this:

RATE UNITS
12.00% 0
0.00% 1500
10.00% 6000
20.00% 8000

and I need to calculate a weighted average rate. I need to exclude the row
if either rate or units contain a 0 value.

The result should show a wtd value of 15.71%

my formula is a mess:

={(SUM(IF(AND(UNITS<0,RATES<0),(RATES*UNITS)/(SUM(IF(UNITS<0,UNITS,0))),0)))}

If anyone can help straighten me out, I'd appreciate it. :)

Thank you,

Nacho

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default calculating wtd number with conditional array formula

Thank you Dave - I was able to use your suggestion in this formula that
solved the problem! :

=SUM(IF(ACFRATES*ACFUNITS<0,ACFRATES*ACFUNITS/(SUM(IF(ACFUNITS*ACFRATES<0,ACFUNITS,0)))))

"Dave F" wrote:

One way would be to create a third helper column in which you enter the
following formula (assumes your data starts in the 2nd row):
=IF(A2*B2=0,"Ignore","Include" and fill down as necessary.

Then you could filter out the "Ignore"s and run the weighted average.
--
Brevity is the soul of wit.


"nacholibre" wrote:

Hello, I have a data set that looks like this:

RATE UNITS
12.00% 0
0.00% 1500
10.00% 6000
20.00% 8000

and I need to calculate a weighted average rate. I need to exclude the row
if either rate or units contain a 0 value.

The result should show a wtd value of 15.71%

my formula is a mess:

={(SUM(IF(AND(UNITS<0,RATES<0),(RATES*UNITS)/(SUM(IF(UNITS<0,UNITS,0))),0)))}

If anyone can help straighten me out, I'd appreciate it. :)

Thank you,

Nacho

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default calculating wtd number with conditional array formula

Interesting. I take it that's an array formula?
--
Brevity is the soul of wit.


"nacholibre" wrote:

Thank you Dave - I was able to use your suggestion in this formula that
solved the problem! :

=SUM(IF(ACFRATES*ACFUNITS<0,ACFRATES*ACFUNITS/(SUM(IF(ACFUNITS*ACFRATES<0,ACFUNITS,0)))))

"Dave F" wrote:

One way would be to create a third helper column in which you enter the
following formula (assumes your data starts in the 2nd row):
=IF(A2*B2=0,"Ignore","Include" and fill down as necessary.

Then you could filter out the "Ignore"s and run the weighted average.
--
Brevity is the soul of wit.


"nacholibre" wrote:

Hello, I have a data set that looks like this:

RATE UNITS
12.00% 0
0.00% 1500
10.00% 6000
20.00% 8000

and I need to calculate a weighted average rate. I need to exclude the row
if either rate or units contain a 0 value.

The result should show a wtd value of 15.71%

my formula is a mess:

={(SUM(IF(AND(UNITS<0,RATES<0),(RATES*UNITS)/(SUM(IF(UNITS<0,UNITS,0))),0)))}

If anyone can help straighten me out, I'd appreciate it. :)

Thank you,

Nacho

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default calculating wtd number with conditional array formula

yep. :)

"Dave F" wrote:

Interesting. I take it that's an array formula?
--
Brevity is the soul of wit.


"nacholibre" wrote:

Thank you Dave - I was able to use your suggestion in this formula that
solved the problem! :

=SUM(IF(ACFRATES*ACFUNITS<0,ACFRATES*ACFUNITS/(SUM(IF(ACFUNITS*ACFRATES<0,ACFUNITS,0)))))

"Dave F" wrote:

One way would be to create a third helper column in which you enter the
following formula (assumes your data starts in the 2nd row):
=IF(A2*B2=0,"Ignore","Include" and fill down as necessary.

Then you could filter out the "Ignore"s and run the weighted average.
--
Brevity is the soul of wit.


"nacholibre" wrote:

Hello, I have a data set that looks like this:

RATE UNITS
12.00% 0
0.00% 1500
10.00% 6000
20.00% 8000

and I need to calculate a weighted average rate. I need to exclude the row
if either rate or units contain a 0 value.

The result should show a wtd value of 15.71%

my formula is a mess:

={(SUM(IF(AND(UNITS<0,RATES<0),(RATES*UNITS)/(SUM(IF(UNITS<0,UNITS,0))),0)))}

If anyone can help straighten me out, I'd appreciate it. :)

Thank you,

Nacho

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
Find value in array Brook6 Excel Worksheet Functions 26 January 30th 07 09:40 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Formula to count number of dates in an array Lilasviolet Excel Worksheet Functions 2 April 7th 05 07:44 PM


All times are GMT +1. The time now is 04:37 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"