Computer Hope

Software => Computer software => Topic started by: Spoiler on December 14, 2012, 10:10:41 AM

Title: Excel and dates
Post by: Spoiler on December 14, 2012, 10:10:41 AM
Hi All,
I am updating a old spreadsheet and wanted to add some work days down the side of it. The problem I have is that I only want Mon-Friday dates to be listed. For example....

12/3/2012
12/4/2012
12/5/2012
12/6/2012
12/7/2012
12/10/2012

etc.....

For some reason I can't get it to work right. In this example you can see that the first work day for Dec is the 3rd and that the 8th and 9th are passed over because they are a weekend.

I know I have done this before I just can't remember how I did it. I was able to click on a cell and drag down to highlite a months worth of cells and put in a formaula in the first cell and then all the dates would just show up below it.

Anyone have any ideas?

Thanks
Spoiler

Title: Re: Excel and dates
Post by: soybean on December 14, 2012, 12:13:35 PM
I know I have done this before I just can't remember how I did it. I was able to click on a cell and drag down to highlite a months worth of cells and put in a formaula in the first cell and then all the dates would just show up below it.
Are dates for all rows part of the existing data?

If so, then one approach might be to add a column to show the day of the week and then use a Filter to show all days except Saturday and Sunday.
Title: Re: Excel and dates
Post by: oldun on December 14, 2012, 04:52:31 PM
One option is, with a start date in A1, enter =WEEKDAY(A1,1) in B1, and copy it down.
Title: Re: Excel and dates
Post by: Spoiler on December 17, 2012, 08:23:58 AM
soybean
All the dates are is a list. They don't come from any other data. I am using it just to keep track of the days work.

May this snippet will help explan.



[year+ old attachment deleted by admin]
Title: Re: Excel and dates
Post by: soybean on December 17, 2012, 12:03:27 PM
So, somehow, you entered a formula in the top cell of a range and then dragged the content of that cell down to numerous rows below it and the dates filled in those cells but this did not include weekends.  Is that right?  To reiterate, you did not simply enter the date in the first/top cell, you entered a formula which skipped Saturdays and Sundays.  Am I right so far?   
Title: Re: Excel and dates
Post by: Spoiler on December 17, 2012, 02:43:04 PM
I think you are on the right track. At this point all I am interested in is to list the weekdays. How its done really isn't that important.

Title: Re: Excel and dates
Post by: BC_Programmer on December 17, 2012, 02:54:40 PM
this functionality appears to be built into Excel.

Put the start date in a cell.

Grab the Fill Handle (it's a small black box in the bottom right of the cell) and drag it down as far as desired. When you release, a small toolbox button should appear, titled "Autofill options". Expand this, and you can select a "Fill weekdays" option, which will exclude weekends.