Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Exclude Sat and Sun, Median Formula

Hi,

I have this formula: =MEDIAN(0,$F4,$E4-((COLUMNS($G4:G4)-1)*$F4))

Column E = Total Hours
Column F = Hours per Day

It helps me to distribute the amount of hours per day. So if column E has a
value of 40 Hrs

Colums G equals to 16
Column H equals to 16
Column I equals to 8
Column J equals to 0
and so on.........

Works great. But What I would like to do is to some how check the day of the
week, if my column is sat or sun the value will be zero.
The problem I have is that the next Column which will be Monday return a
value of Zero. Making the formula useless.

Any help will be really appreciated.

Regards,

Bre-x




  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Exclude Sat and Sun, Median Formula

Assuming you have dates in row 3:

=IF(WEEKDAY(G3,2)5,0,MEDIAN(0,$F4,$E4-((COLUMNS($G4:G4)-SUMPRODUCT(--(WEEKDAY($G3:G3,2)5))-1)*$F4)))

--
Biff
Microsoft Excel MVP


"Bre-x" wrote in message
...
Hi,

I have this formula: =MEDIAN(0,$F4,$E4-((COLUMNS($G4:G4)-1)*$F4))

Column E = Total Hours
Column F = Hours per Day

It helps me to distribute the amount of hours per day. So if column E has
a value of 40 Hrs

Colums G equals to 16
Column H equals to 16
Column I equals to 8
Column J equals to 0
and so on.........

Works great. But What I would like to do is to some how check the day of
the week, if my column is sat or sun the value will be zero.
The problem I have is that the next Column which will be Monday return a
value of Zero. Making the formula useless.

Any help will be really appreciated.

Regards,

Bre-x






  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Exclude Sat and Sun, Median Formula

We can reduce that a little. Instead of subtracting weekends we can just
count the weekdays:

=IF(WEEKDAY(G3,2)5,0,MEDIAN(0,$F4,$E4-(SUMPRODUCT(--(WEEKDAY($G3:G3,2)<6))-1)*$F4))

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Assuming you have dates in row 3:

=IF(WEEKDAY(G3,2)5,0,MEDIAN(0,$F4,$E4-((COLUMNS($G4:G4)-SUMPRODUCT(--(WEEKDAY($G3:G3,2)5))-1)*$F4)))

--
Biff
Microsoft Excel MVP


"Bre-x" wrote in message
...
Hi,

I have this formula: =MEDIAN(0,$F4,$E4-((COLUMNS($G4:G4)-1)*$F4))

Column E = Total Hours
Column F = Hours per Day

It helps me to distribute the amount of hours per day. So if column E has
a value of 40 Hrs

Colums G equals to 16
Column H equals to 16
Column I equals to 8
Column J equals to 0
and so on.........

Works great. But What I would like to do is to some how check the day of
the week, if my column is sat or sun the value will be zero.
The problem I have is that the next Column which will be Monday return a
value of Zero. Making the formula useless.

Any help will be really appreciated.

Regards,

Bre-x








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
How do I exclude cells from a formula? braitman Excel Discussion (Misc queries) 3 December 4th 06 08:18 PM
Median array formula Ciara Excel Worksheet Functions 1 October 4th 06 10:55 AM
Is there a way that I can exclude a formula from being printed? Dhbomb2k1 Excel Discussion (Misc queries) 4 July 8th 06 02:47 AM
Median Formula In Pivot Table MikeO Excel Worksheet Functions 0 April 20th 06 08:03 PM
Excel 2003 - SUM Formula - exclude cell Peppermint Excel Worksheet Functions 2 January 4th 06 04:53 PM


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