Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Arlen
 
Posts: n/a
Default Populate a field with just workdays

I am creating a spreadsheet to keep track of dentist office productivity. In
one box, I want to allow the user to enter the month and have the workdates
change accordingly. For example, our office works Mondays through Thursdays.
In 2005, the first Monday in January is the 3rd. How could I change the
dates to read 3, 4, 5, 6, then skip to 10, 11, 12, 13, then skip until all
the M-Th of the month are included.

These dates should change if the user types in a different month.

Thank you for your help.

Arlen
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

Have the user enter any date of the desired month in cell A1 say
"01/01/2005"

then on cell A3 enter the following formula (array enter it by pressing
ctrl+shift+enter)
=MIN(IF(WEEKDAY(DATE(YEAR(A1),MONTH(A1),ROW(INDIRE CT("1:31"))),3)<5,(DATE(YEAR(A1),MONTH(A1),ROW(IND IRECT("1:31"))))))

and copy this formula from cell a4 thru say a30
=IF(A3="","",IF(MONTH(A3+IF(WEEKDAY(A3+1,3)<4,1,4) )=MONTH($A$1),(A3+IF(WEEKDAY(A3+1,3)<4,1,4)),""))

this will produce a list of work days for that month that are from monday
thru thursday


"Arlen" wrote in message
...
I am creating a spreadsheet to keep track of dentist office productivity.
In
one box, I want to allow the user to enter the month and have the
workdates
change accordingly. For example, our office works Mondays through
Thursdays.
In 2005, the first Monday in January is the 3rd. How could I change the
dates to read 3, 4, 5, 6, then skip to 10, 11, 12, 13, then skip until all
the M-Th of the month are included.

These dates should change if the user types in a different month.

Thank you for your help.

Arlen



  #3   Report Post  
N Harkawat
 
Posts: n/a
Default

My mistake on cell a3 enter the following instead
=MIN(IF(WEEKDAY(DATE(YEAR(A1),MONTH(A1),ROW(INDIRE CT("1:31"))),3)<4,(DATE(YEAR(A1),MONTH(A1),ROW(IND IRECT("1:31"))))))
(array enterered)

"N Harkawat" wrote in message
...
Have the user enter any date of the desired month in cell A1 say
"01/01/2005"

then on cell A3 enter the following formula (array enter it by pressing
ctrl+shift+enter)
=MIN(IF(WEEKDAY(DATE(YEAR(A1),MONTH(A1),ROW(INDIRE CT("1:31"))),3)<5,(DATE(YEAR(A1),MONTH(A1),ROW(IND IRECT("1:31"))))))

and copy this formula from cell a4 thru say a30
=IF(A3="","",IF(MONTH(A3+IF(WEEKDAY(A3+1,3)<4,1,4) )=MONTH($A$1),(A3+IF(WEEKDAY(A3+1,3)<4,1,4)),""))

this will produce a list of work days for that month that are from monday
thru thursday


"Arlen" wrote in message
...
I am creating a spreadsheet to keep track of dentist office productivity.
In
one box, I want to allow the user to enter the month and have the
workdates
change accordingly. For example, our office works Mondays through
Thursdays.
In 2005, the first Monday in January is the 3rd. How could I change the
dates to read 3, 4, 5, 6, then skip to 10, 11, 12, 13, then skip until
all
the M-Th of the month are included.

These dates should change if the user types in a different month.

Thank you for your help.

Arlen





  #4   Report Post  
 
Posts: n/a
Default

Arlen wrote...
I am creating a spreadsheet to keep track of dentist office

productivity. In
one box, I want to allow the user to enter the month and have the

workdates
change accordingly. For example, our office works Mondays through

Thursdays.
In 2005, the first Monday in January is the 3rd. How could I change

the
dates to read 3, 4, 5, 6, then skip to 10, 11, 12, 13, then skip until

all
the M-Th of the month are included.

These dates should change if the user types in a different month.


If the user entered the month alone in cell A1, and that entry was
always assumed to be in the current year, then the first weekday of
that month would be given by

=("1-"&A1)+(WEEKDAY("1-"&A1,3)3)*(7-WEEKDAY("1-"&A1,3))

If that formula were in cell A3, then the next workday would be given
by

=IF(COUNT(1/(DAY(A3)<DAY(A3+IF(WEEKDAY(A3,3)<3,1,4)))),
A3+IF(WEEKDAY(A3,3)<3,1,4),"")

Fill this down into A4:A21. Give these cells the custom number format d.

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 to CONCATENATE two dates field together Lisa Excel Worksheet Functions 6 April 2nd 23 08:09 PM
How to create a calculated field formula based on Pivot Table resu dha17 Excel Discussion (Misc queries) 1 December 15th 04 05:39 AM
How do link to a remote field but use the path from a stored field Michael T. Excel Discussion (Misc queries) 1 December 10th 04 12:18 AM
Word field codes in Excel data file Includetext mranz Excel Discussion (Misc queries) 1 December 7th 04 11:19 PM
How to populate column with formula based on value in cell Cameron Stewart Excel Worksheet Functions 2 November 2nd 04 01:36 AM


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

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

About Us

"It's about Microsoft Excel"