#1   Report Post  
malik641
 
Posts: n/a
Default AVERAGE problem


Okay, to start...I have 2 rows, 1 and 2, where Row1 has dd-"month" and
Row2 has "day". And a 3rd row has percent values which are to be
averaged. Example:

D1=01-Apr--- E1=02-Apr
D2=Fri---------E2=Sat
D3=50%-------E3=100%

and so on and so forth. We'll just say it goes until the end of the
month and the following months thereafter.

Now let's say that:
D5=Apr-05-----E5='The average of the month EXCLUDING weekends and
holidays'.
D6=May-05-----E6='Same formula as E5 except using the month of May'
and so on...

How could I sum the values of the percentages given the criteria?
I would guess it would be using the Index & Match functions, but how?


--
malik641
------------------------------------------------------------------------
malik641's Profile: http://www.excelforum.com/member.php...o&userid=24190
View this thread: http://www.excelforum.com/showthread...hreadid=388046

  #2   Report Post  
Morrigan
 
Posts: n/a
Default


Try this with 2 helper rows:

Helper1 = assign "Weekday" or "Weekend" to the corresponding day
Helper2 = Concatenate(Month,Helper1) (May look something like
"AprWeekday", "AprWeekend", "MayWeekday", etc)

Apply

SUMIF(D2:XX2,"AprWeekday",D3:XX3)/COUNTIF(D2:XX2,"AprWeekday")


Hope it helps.



malik641 Wrote:
Okay, to start...I have 2 rows, 1 and 2, where Row1 has dd-"month" and
Row2 has "day". And a 3rd row has percent values which are to be
averaged. Example:

D1=01-Apr--- E1=02-Apr
D2=Fri---------E2=Sat
D3=50%-------E3=100%

and so on and so forth. We'll just say it goes until the end of the
month and the following months thereafter.

Now let's say that:
D5=Apr-05-----E5='The average of the month EXCLUDING weekends and
holidays'.
D6=May-05-----E6='Same formula as E5 except using the month of May'
and so on...

How could I sum the values of the percentages given the criteria?
I would guess it would be using the Index & Match functions, but how?



--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=388046

  #3   Report Post  
Domenic
 
Posts: n/a
Default


Assumptions:

1) D1:CP3 contains your data

2) D5, D6, etc. contain the first day for each month and year

3) A1:A10 contains your list of holidays


Formula:

E5, copied down:

=AVERAGE(IF($D$3:$CP$3<"",IF(($D$1:$CP$1-DAY($D$1:$CP$1)+1=D5)*(WEEKDAY($D$1:$CP$1,2)<6)*(1-ISNUMBER(MATCH($D$1:$CP$1,$A$1:$A$10,0))),$D$3:$CP $3)))

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER. Adjust the
ranges accordingly.

Hope this helps!

malik641 Wrote:
Okay, to start...I have 2 rows, 1 and 2, where Row1 has dd-"month" and
Row2 has "day". And a 3rd row has percent values which are to be
averaged. Example:

D1=01-Apr--- E1=02-Apr
D2=Fri---------E2=Sat
D3=50%-------E3=100%

and so on and so forth. We'll just say it goes until the end of the
month and the following months thereafter.

Now let's say that:
D5=Apr-05-----E5='The average of the month EXCLUDING weekends and
holidays'.
D6=May-05-----E6='Same formula as E5 except using the month of May'
and so on...

How could I sum the values of the percentages given the criteria?
I would guess it would be using the Index & Match functions, but how?



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=388046

  #4   Report Post  
malik641
 
Posts: n/a
Default


Thanks! It's working Great now!


--
malik641


------------------------------------------------------------------------
malik641's Profile: http://www.excelforum.com/member.php...o&userid=24190
View this thread: http://www.excelforum.com/showthread...hreadid=388046

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
plotted Average Micayla Bergen Charts and Charting in Excel 4 July 15th 05 12:13 PM
Weighed Average of a weiged average when there are blanks krl - ExcelForums.com Excel Discussion (Misc queries) 1 July 6th 05 07:37 PM
What is this kind of average called? havocdragon Excel Worksheet Functions 3 June 24th 05 05:10 PM
"Drop the lowest" in computing average Matthew Leingang Excel Worksheet Functions 8 June 8th 05 12:31 AM
Average the Last Five Cells in a Column Warrior Princess Excel Worksheet Functions 3 March 16th 05 02:12 PM


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