Hui’s Excel Report Printer

Share

Facebook
Twitter
LinkedIn

Over a decade ago I was working on a very large and complex budget model, come to think of it I still am?

It involved 4 linked Excel workbooks, about 30 worksheets, all different, and multiple views of each worksheet.

There were regular Worksheets and Chart Sheets interspersed throughout.

Some of the Ranges had Outlined/Grouped Totals that were indented on some reports, but not on others depending on whom the various reports were going to.

It was a great budget model until you had to print a copy of it.

And of course the different levels of Managers all want different reports etc, etc.

 

The Solution

To solve this I developed a simple VBA routine which has evolved over the years to what is presented here.

The basic idea is to add a Printing Control sheet to your workbook.

This sheet has a list of print views, not Excel views, of various pages within the current workbook.

Each page can be setup as you wish and allows for a number of common parameters for each printed page.

Pages can be listed, multiple times if required, with different ranges or outlining selected each time

The Code handles Worksheets and Chartsheets, Normal and Named Ranges, Page Orientation, Page Size, Page Grouping and Headers/Footers.

As a user you setup the sheets as a list in the order you want them, with appropriate parameters.

The code then:

  • Loops through the list,
  • Obtain the parameters,
  • Sets up the print page and
  • Prints it.

You just need to sit back and wait for the printer to jam.

HOW DO I USE IT

Download the sample file here Excel 97-03, Excel 2007/10

You can use the sample file as is, for demo purposes or read on later where I describe how to use this in your workbooks.

Open the workbook and Goto the “Print_Control” worksheet.

Browse through the various Headings in Row 4 and field values below them.

Note that some of the Row 4 cells have comments in which explain what options are available.

Each field is described below:

No.

The Row No. in the list of page layouts available.

This has no use except when someone says the 5th page should be…

Description/Header

A text field that is used as a Reminder of the layout of the Page Setup also serves as a Centred Header.

Status

Print = On

Don’t Print = Off

The code only prints the pages marked as On.

Sheet

The name of the Worksheet or Chartsheet you want to print

Area

The Range on the Sheet that you want printed

Ignored for Chartsheets.

Land/Port

Specify if the page should be printed Landscape or Portrait

Ignored for Chartsheets.

Chartsheets are printed in Landscape.

Pages Wide

How many pages wide should the Range be printed on

This is fixed at 1 for Chartsheets.

Pages Tall

How many pages tall should the Range be printed out on

This is fixed at 1 for Chartsheets.

Copies

How Many Copies do you want of that individual page.

Rows & Columns

If outline/grouping is used specify what level of Indentation should be used for the Rows and Columns.

0 – Leave as is

1 – Indent 1 level

8  – Indent 8 levels

The maximum indentation is 8

Ignored for Chartsheets.

Footer (Left)

A description field printed as lower left footer.

No. of Copies

This specifies the Number of Copies of the Whole Report you want

Print All “On” Areas

The Print All “On” Areas Button executes the code and prints out a number of copies of the report as specified in the various page setups.

The printing is done on the default printer on your PC,

Important: Ensure that the printer you want to use for the job is set as the default before you start Excel.

You can print to a PDF file by specifying your Adobe or other PDF Printer as the Default Printer.

I’m sorry, This doesn’t fix the printing multiple pages to multiple files when printing to PDF issue.

 

Warning ! I maybe old school but I still recommend saving before printing !

 

HELP

There is limited help built into the system, That’s what this Post is doing.

Some of the field headings have comments which show what values are acceptable in those fields.

HOW DO I ADD THIS TO MY WORKBOOK ?

To add this to your workbook, copy the Print_Control worksheet to your workbook

  1. Open your workbook.
  2. Open the Demo File
  3. Copy the Print_Control worksheet by Right Clicking on the Print_Control tab, and copy to your workbook.
  4. Run the VBA Code using the “Setup Print Control Named Formula” Button

That’s it.

All the code required for the printing is part of the Print_Control page.

 

HOW DOES THE VBA WORK ?

The following describes the VBA Code driving this worksheet.

To examine this goto VBA (Alt F11)

Select the workbook and double click on Sheet0 (Print_Control)

The code should appear in the right hand window

If you are unfamiliar with VBA it may be worth going through Chandoo’s Crash Course in VBA

There are 2 Subroutines and a Function in this system which are documented below

 

Print_Reports

This is the main subroutine that drives the printing

It is called by the Print All On Button and when finished returns the user to the Print_Control worksheet.

All the VBA code is in RED,

Comments and notes are in BLACK before the line or section they refer to.

= = = = = = = = = = = = = = = = = = =

At the start of the Print_Reports subroutine, setup variables for later use

Option Explicit

Public Sub Print_Reports()

Dim PrintArea As Variant

Dim i As Integer

Dim j As Integer

Dim sht As Long

Dim Orientation As String

Dim NCopies As Integer

Dim PWide As Integer

Dim PTall As Integer

Dim Footer As String

Dim Header As String

Dim Sheets As String

Dim gRow As Integer

Dim gCol As Integer

Dim PaperSize As String

Dim msg As String

Dim tmp As String

Turn off the Automatic Calculation so that it is faster and isn’t as jerky

Application.Calculation = xlCalculationManual

This loads the entire array of the Print_Control page into an array called PrintArea

PrintArea = Worksheets(“Print_Control”).Range(“Print_Control”).Value

This sets up a loop for the No of Total Copies of the Whole report

For j = 1 To [Copies].Value ‘Loop through the No of Copies

This sets up a loop for the to check each line of the Print Control area

For i = 1 To UBound(PrintArea, 1) ‘Loop through the print area

If the Column Status is On print using that line of settings

If UCase(PrintArea(i, 3)) = “ON” Then ‘When On is enabled Print using the settings

Extract the settings from the stored array, row i

Header = PrintArea(i, 2) ‘Set Header variable

Orientation = PrintArea(i, 6) ‘Set Orientation variable

PWide = PrintArea(i, 8 ) ‘Set Pages Wide variable

PTall = PrintArea(i, 9) ‘Set Pages Tall variable

NCopies = PrintArea(i, 10) ‘Set No Copies variable

gRow = PrintArea(i, 11) ‘Set Row Group Expansion

gCol = PrintArea(i, 12) ‘Set Column Group Expansion

Footer = PrintArea(i, 13) ‘Set Footer variable

Check paper sizes against the built in page sizes

If PrintArea(i, 7) = “A4” Then

PaperSize = 9

ElseIf PrintArea(i, 7) = “A3” Then

PaperSize = 8

ElseIf PrintArea(i, 7) = “A5” Then

PaperSize = 11

ElseIf PrintArea(i, 7) = “Legal” Then

PaperSize = 5

ElseIf PrintArea(i, 7) = “Letter” Then

PaperSize = 1

ElseIf PrintArea(i, 7) = “Quarto” Then

PaperSize = 15

ElseIf PrintArea(i, 7) = “Executive” Then

PaperSize = 7

ElseIf PrintArea(i, 7) = “B4” Then

PaperSize = 12

ElseIf PrintArea(i, 7) = “B5” Then

PaperSize = 13

ElseIf PrintArea(i, 7) = “10×14” Then

PaperSize = 16

ElseIf PrintArea(i, 7) = “11×17” Then

PaperSize = 17

ElseIf PrintArea(i, 7) = “Csheet” Then

PaperSize = 24

ElseIf PrintArea(i, 7) = “Dsheet” Then

PaperSize = 25

Else

PaperSize = 9 ‘Defaults to A4

End If

Activate the relevant sheet

This checks that the sheet exists first

tmp = PrintArea(i, 4)

SheetExists(tmp) is a UDF that’s checks if the sheet exists and returns True or False

If Not SheetExists(tmp) Then

msg = “Sheet ‘” + PrintArea(i, 4) + “‘ not found.” + vbCrLf + “Check the sheets Name.”

msg = msg + vbCrLf + vbCrLf + “Processing will continue for remaining sheets.”

tmp = MsgBox(msg, vbExclamation, “Sheet not Found”)

Else

The sheet exists now process

Select the sheet

Application.Sheets(PrintArea(i, 4)).Select

Check if it is a Worksheet or a Chartsheet

If ActiveSheet.Type = -4167 Then ‘Its a worksheet

Turn off screen updating

Application.ScreenUpdating = False

Select the relevnt area of the sheet

ActiveSheet.PageSetup.PrintArea = PrintArea(i, 5) ‘Select the relevent Print Area of the Sheet

Set Outline levels

ActiveSheet.Outline.ShowLevels RowLevels:=gRow, ColumnLevels:=gCol ‘Set Outline Grouping

Apply print settings

With ActiveSheet.PageSetup ‘Set print settings

.PrintTitleRows = “”

.PrintTitleColumns = “”

.LeftHeader = “”

.CenterHeader = Header ‘User Defined Header (Shift to Left or Right as required)

.RightHeader = “”

.LeftFooter = Footer ‘User Defined Footer (Shift to Left or Right as required)

.CenterFooter = “”

.RightFooter = “”

.LeftMargin = Application.InchesToPoints(0.1)

.RightMargin = Application.InchesToPoints(0.1)

.TopMargin = Application.InchesToPoints(1.0)

.BottomMargin = Application.InchesToPoints(0.4)

.HeaderMargin = Application.InchesToPoints(0.1)

.FooterMargin = Application.InchesToPoints(0.3)

.PrintHeadings = False

.PrintGridlines = False

.PrintComments = xlPrintNoComments

.CenterHorizontally = False

.CenterVertically = False

.Draft = False

.PaperSize = PaperSize ‘ User Defined Paper Size

.FirstPageNumber = xlAutomatic

.Order = xlDownThenOver

.BlackAndWhite = False

.Zoom = False

.FitToPagesWide = PWide ‘User Defined No Pages Wide

.FitToPagesTall = PTall ‘User Defined No Pages Tall

.PrintErrors = xlPrintErrorsDisplayed

End With

Apply page orientation settings

If Orientation = “L” Then ‘User Defined Page Orientation

ActiveSheet.PageSetup.Orientation = xlLandscape

Else

ActiveSheet.PageSetup.Orientation = xlPortrait

End If

Turn Screen updating back on

Application.ScreenUpdating = True

Finished setting up Worksheet goto the Printing area

Else ‘Its a Chart page

Turn Screen updating off

Application.ScreenUpdating = False

Apply print settings

With ActiveChart.PageSetup

.LeftHeader = “”

.CenterHeader = Header

.RightHeader = “”

.LeftFooter = Footer

.CenterFooter = “”

.RightFooter = “”

.LeftMargin = Application.InchesToPoints(0.1)

.RightMargin = Application.InchesToPoints(0.1)

.TopMargin = Application.InchesToPoints(1#)

.BottomMargin = Application.InchesToPoints(0.4)

.HeaderMargin = Application.InchesToPoints(0.1)

.FooterMargin = Application.InchesToPoints(0.3)

.ChartSize = xlScreenSize

.PrintQuality = 600Change to 300 for Excel 97-03

.CenterHorizontally = True

.CenterVertically = True

.Orientation = xlLandscape

.Draft = False

.OddAndEvenPagesHeaderFooter = False ‘Removed from 97/03 Ver

.DifferentFirstPageHeaderFooter = False ‘Removed from 97/03 Ver

.EvenPage.LeftHeader.Text = “” ‘Removed from 97/03 Ver

.EvenPage.CenterHeader.Text = “” ‘Removed from 97/03 Ver

.EvenPage.RightHeader.Text = “” ‘Removed from 97/03 Ver

.EvenPage.LeftFooter.Text = “” ‘Removed from 97/03 Ver

.EvenPage.CenterFooter.Text = “” ‘Removed from 97/03 Ver

.EvenPage.RightFooter.Text = “” ‘Removed from 97/03 Ver

.FirstPage.LeftHeader.Text = “” ‘Removed from 97/03 Ver

.FirstPage.CenterHeader.Text = “” ‘Removed from 97/03 Ver

.FirstPage.RightHeader.Text = “” ‘Removed from 97/03 Ver

.FirstPage.LeftFooter.Text = “” ‘Removed from 97/03 Ver

.FirstPage.CenterFooter.Text = “” ‘Removed from 97/03 Ver

.FirstPage.RightFooter.Text = “” ‘Removed from 97/03 Ver

.PaperSize = PaperSize

.FirstPageNumber = xlAutomatic

.BlackAndWhite = False

.Zoom = 100

End With

Turn Screen Updating back on

Application.ScreenUpdating = True

End If

Now Print the active sheet using user defined No. Copies

ActiveWindow.SelectedSheets.PrintOut Copies:=NCopies, Collate:=True

End If

End If

Next i

Next j

Clear PrintArea array, just in case

PrintArea = Null

Turn Auto Calculation back on

Application.Calculation = xlCalculationAutomatic

Go back to the Print Control sheet

Application.Sheets(“Print_Control”).Select

End Sub

= = = = = = = = = = = = = = = = = = =

The SheetExists Function

This is a Function that is used by the Print_Reports subroutine to check if a sheet exists.

= = = = = = = = = = = = = = = = = = =

Function SheetExists(SheetName As String) As Boolean

‘ This function Returns TRUE if the sheet exists in the active workbook

SheetExists = False ‘Set default value of SheetExists

On Error GoTo NoSuchSheet ‘Set error trapping such that if the sheet doesn’t exist it will exit

Check length of sheet name, if the sheet exists it will return a value, otherwise an error

If Len(Sheets(SheetName).Name) > 0 Then

The sheet exists so set SheetExists = True and exit

SheetExists = True

Exit Function

End If

NoSuchSheet:

The sheet doesn’t exists so use default SheetExists = False and exit

End Function

= = = = = = = = = = = = = = = = = = =

The Setup_Print_Control_Named_Formula Subroutine

This is a simple subroutine that sets up the 2 named formula for use the first time a sheet is used.

= = = = = = = = = = = = = = = = = = =

Sub Setup_Print_Control_Named_Formula()

Setup Named Formula “Print_Control” which is the table of settings

ActiveWorkbook.Names.Add Name:=”Print_Control”, RefersToR1C1:= _

“=OFFSET(Print_Control!R4C2,1,,COUNTA(Print_Control!R5C2:R24C2),COUNTA(Print_Control!R4))”

ActiveWorkbook.Names(“Print_Control”).Comment = _

“Used by the Print_Reports Subroutine”

Setup Named Formula “Copies” which is the No of Copies of the Whole Report

ActiveWorkbook.Names.Add Name:=”Copies”, RefersToR1C1:= _

“=Print_Control!R26C13”

ActiveWorkbook.Names(“Copies”).Comment = “Specifies the No. of Copies for the Print_Reports Subroutine”

End Sub

= = = = = = = = = = = = = = = = = = =

NAMED FORMULA

The code relies on two Named Formulas

Copies:

=Print_Control!$L$27

Print_Control:

=OFFSET(Print_Control!$B$4,1,,COUNTA(Print_Control!$B$5:$B$24),COUNTA(Print_Control!$4:$4))

Automatically adjusts the Print_Control Named Formula for the number of Page Setup lines and Fields to be processed

If you have queries about how any of the above code works, please let me know in the comments below:

 

WHAT DOES THE ARRAY “PrintArea” DO ?

The print area array stores the values of the Print_Control range in a 2 dimensional array which represents the Print_Control range.

This is done for a few reasons, but simply it is faster as it results in less reading of the worksheet

It also allows more flexibility in the subsequent processing as all the data is in one area.

 

DOWNLOADS

Download the sample file here Excel 97-03, Excel 2007/10

 

WHAT’S NEXT

There are a number of parameters used in the Print Setup area which are not used or not used in the 97/03 version.

The code above is easily extended to include these if you desire.

One day when I have a spare moment (Most likely in 2025!) I will add the option for automatic incremental Page Numbers.

 

CLOSING

This code has saved, my staff and I, hundreds and hundreds of hours over the past decade whilst printing complex Excel workbooks.

This functionality was also one of the more requested issues from our poll of 3 months ago We Want Your Ideas!

I hope you enjoy it as much as I have ?

 

Updates

I will be extending the functionality of this in the future and so if you have any suggestions, lets hear them in the comments below:

 

How have you tackled large print jobs ?

I look forward to your comments below:

 

Hui…

For a list of my other contributions at Chandoo.org please visit; Hui.

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

35 Responses to “Skip weekends while autofilling dates in excel”

    • Foodie says:

      Hi,
      Is there any way that I will choose which are my "working days"?
      means, I want to leave also Friday as a free day and not only Saturday.
      Or, maybe someday I will pick Tuesday as a day off.

      • Mihai says:

        I need to also peek Wednessday, Thursday and Friday as days off. Also, for Tuesday, I would need to leave it off once every two weeks. Is there a way to easy achieve this, so that I won't actually add to my workload?

  1. Deep says:

    Hi,

    I am using MS Office 2007 and for some reason, it does not show me these options. It just shows me 3 options:

    Copy Cell (Not sure about the exact text)
    Copy with Formatting
    Copy without Formatting

    Any idea how to get those options up?

    Regards,
    Deep

  2. Chandoo says:

    @Deep : I am not so well versed with 2007, but here is how you can do this using menus:

    enter first date of the series
    select the range you want to fill
    go to menu > edit > fill > series
    in the dialog, select date as the series type and "weekdays only" option
    press ok...

    Let me know if this doesnt work...

  3. Deep says:

    Now that was FAST!!!

    I tried it but unfortunately it didn't work..

    Here is the screenshot:

    http://img291.imageshack.us/img291/6573/excelsheetyr2.gif

    This is what I tried..

    I put the date in one row, in another row, added some calculations (as you can see in the image) and drag the content in other rows..

    I could not find any Edit menu so i just clicked on the icon as you have shown in the 2nd image..

    I hope I did the right thing...

  4. Chandoo says:

    Hmm...
    there should be an edit menu as far as I know. Let me check that...

    meanwhile... if it works you can use formulas to fill the series.

    1. just enter the first date
    2. in the 2nd row, enter a formula like =if(weekday(firstdatecell,2)=6,firstdatecell+2, firstdatecell+1)
    3. copy the formula over the rest of the range...

  5. Robert says:

    @Deep:

    you have to use the autofill handle, the small box at the lower right of the active cell. Right click on the autofill handle and drag down to the cells you want to autofill. A menu pops up showing the weekdays only option and others.

  6. Deep says:

    @Chandoo - Thanks but it did not work with my calculations. 🙁

    @Robert - Yes, it worked this time but I guess, in my case it won't work as I want to add up the days from the column on the left. (As shown in the image)

    Basically this is what I want:

    1. I want to define project start date
    2. There are no. of days assigned for each module
    3. I want excel to calculate the date automatically. (By adding up the no. of days and deducting the weekends)

    Any kind of help is appriciated.

    Reagrds,
    Deep

  7. Robert says:

    @Deep,

    sorry, I misunderstood your question, I thought you would be searching for the autofill-function only (values).

    If I got your request corrctly now, you could use the WORKDAY-function, returning the date before or after a specified number of workdays.

    In Excel 2003 and earlier the Add-In Analysis Toolpak has to be installed, but since you are using 2007, it should work immediately.

  8. Chandoo says:

    @Deep.. as Robert suggested, Workday is what you should be using. It will calculate future date based number of working days you want to add to input date. Also, you can use this with your own list of holidays.

  9. Deep says:

    Thanks Robert, Chandoo.. I will try the things.. 🙂

  10. Deep says:

    I tried it and this time it worked.. Thanks to both of you.. you guys made my life much more easier 🙂

  11. [...] You can also customize excel lists so that you can auto-fill, lets say bank holidays in your country or types of beer in your pub. One more auto fill trick. [...]

  12. ibabs says:

    Hello,
    I understand how to turn off the weekend values for a date fill in a regular auto fill. But, what if you are trying to create a custom one, that counts the amount of days in the formula bar, like 2 days, then 5 days, then 1 day etc etc etc, but they must be working days only and they must not include the weekends.
    can that be done?
    thanks!

  13. rem says:

    hi..
    i'm using excel 2007
    I'm trying to insert current date automatically
    then it suppose not to change after i save and open it on the next day.I need it to stay on the issued date.
    i'm using Today function and it is not well work 4 me.
    anybody can help to resolve my prob here?
    please...

  14. Cheng says:

    Hi guys,

    How about if I just wanna fill up with weekend? The way I am doing now is using the function weekday and use filter to get weekend. Would appreciate if any one comes up with a better idea. Thank you very much.

    Regards
    Cheng

  15. Kathy says:

    What happened to being able to indicate the series by adding a few cells and then using the autofill to copy? I can't get this to work - I need 4 rows with the same date skipping weekends.

    2/6/2012
    2/6/2012
    2/6/2012
    2/6/2012
    2/7/2012
    2/7/2012
    2/7/2012
    2/7/2012
    2/8/2012
    2/8/2012
    2/8/2012
    2/8/2012
    2/9/2012
    2/9/2012
    2/9/2012
    2/9/2012

    • Kamlesh says:

      Hi Kathy, sorry for a late comment. However, here's the solution.
      1.) put your 1st desired date in the 1st 4 cells required (e.g. <cell A1:A4> 2/6/2012)
       
      2.) put the following formula as is in the following four cell (i.e. A5:A8)
       
      =IF(WEEKDAY(A1,2)=5,A1+3, A1+1)
      =IF(WEEKDAY(A2,2)=5,A2+3, A1+1)
      =IF(WEEKDAY(A2,2)=5,A2+3, A1+1)
      =IF(WEEKDAY(A2,2)=5,A2+3, A1+1)
       
      Note: "=5" denotes the number of working days in the week
       
               "+3" denotes the number of days on weekends.
               "+1" last denotes the number of days after the working date.
       
      3.) Finally, select cells A4:A8 and then drag drown for furthur dates. The formula will skip Saturday & Sunday in the dates.
       
      Let me know, if you want to tweak the formula as per other ways.

      • Mike says:

        Kamlesh: Thanks for the formula. That was what I was looking for. It works the same in Google Docs Spreadsheets. At first I thought it didn't and did some unnecessary tweaking to make it work.

        I was confused by the "IF(WEEKDAY(A2,2)" the modifier 2. I took it out and surpise, the formula didn't work right. I changed the 5 to 6 and then it worked. Turns out, (you probably know this) the default week starts with Sunday. Using 2 makes it start with Monday.

        Any way, I didn't know about the Weekday function. Thanks for sharing this post.

      • salah says:

        Hi, Kamlesh, before i was using "workday" instead of "weekday" but it didn't work.

        thanks for sharing the right formula.

  16. At this moment I am going to do my breakfast, when having my breakfast
    coming yet again to read further news.

  17. sagari says:

    Hi,
    I'm using excel 2007
    I'm trying to calculate a workday

    4 nov 2014(a1) to 12 nov 2014(a2)

    Normally i'm using Int formula to do this
    =int(a2)-int(a1)

    But, hey thats including weekend too... 😀
    how do you calculate workday with this condition ?
    and if there is not only those day, i mean in a month or two

    Thanks before
    sagari

    • Hui... says:

      @Sagari
      =NETWORKDAYS.INTL(DATE(2014,11,4),DATE(2014,11,12),1)
      =7

      You can also include holidays into the formula by having a list of holidays in say A1:A10
      Then use
      =NETWORKDAYS.INTL(DATE(2014,11,4),DATE(2014,11,12),1,A1:A10)

  18. Vikram says:

    Hi
    i had a query while making a template for one of my school daily task.
    Most of the work in these template includes copy from webpage and paste in the template.

    so the problem here is, whenevr me or my mates try to do ctrl+v
    the format of the cell changes automatically.

    I suggested them to use ctrl+alt+v (text) to paste
    but they are not ok with it. they want me to make template in such a way that it should work with normal ctrl +v

    Any ideas guys ?

  19. Brigitte says:

    Our working week is Tuesday to Saturday if I wish to make a sheet solely using those days is there a formula I can use ?

  20. Balaji Mehtre says:

    I need your support for date.
    I wand to numbering actual working date based on date
    below is expected result... so how can apply formula to get number automatically... please help me get resolve this problem... many thanks in advanced.

    1 8/1/2018
    2 8/2/2018
    3 8/3/2018
    8/4/2018
    8/5/2018
    4 8/6/2018
    5 8/7/2018
    6 8/8/2018
    7 8/9/2018
    8 8/10/2018
    8/11/2018
    8/12/2018
    9 8/13/2018
    10 8/14/2018
    11 8/15/2018
    12 8/16/2018
    13 8/17/2018
    8/18/2018
    8/19/2018
    14 8/20/2018
    15 8/21/2018
    16 8/22/2018
    17 8/23/2018
    18 8/24/2018

  21. Salauddin says:

    Dear Sir,

    I want to make a series of December month which will show all the dates without Fridays.

    Is it Possible sir??

    • Chandoo says:

      Interesting question Salauddin... The built-in options in Excel can't generate dates like this. But you can use simple formulas to make up such a series.

      In first cell (say A1) write the starting date (1-Dec-2019 for example). Makesure this date is not a Friday.
      In the next cell (A2) write =WORKDAY.INTL(A1,1,16)
      Now drag down the A2 cell to fill up dates. Stop when you reach the end of your range of dates.

      If your Excel doesn't have WORKDAY.INTL(), then use the below alternative formula.
      =A1+1+(WEEKDAY(A1)=5)

  22. Salauddin says:

    Thank you, Thank you very much sir. it worked perfectly & I was expecting something like that.

  23. michael says:

    i want to make a template with date that skips fortnightly is it possible in excel

  24. krishna says:

    Hi Chandoo, I need to skip weekends from a specified list of dates.
    from the below information I want to pick only the weekdays amount only along with lookup which has builder name separately.

    Date Builder Units Amount
    06-Jan-08 Doug 8 389
    09-Feb-08 Dave 10 385
    15-Mar-08 Dave 3 771
    18-Apr-08 Brian 5 313
    05-May-08 Larry 10 574
    22-May-08 Rob 8 730
    25-Jun-08 Morgan 4 471
    15-Aug-08 Jones 1 548
    12-Dec-08 Doug 3 323
    10-Apr-09 Dave 5 712
    14-May-09 Dave 9 432
    10-Sep-09 Brian 6 460
    31-Oct-09 Larry 3 741
    18-Sep-08 Rob 8 580
    25-Nov-08 Doug 6 685
    29-Dec-08 Dave 2 401
    24-Mar-09 Dave 10 342
    04-Jul-09 Brian 8 475
    21-Jul-09 Larry 3 535
    07-Aug-09 Rob 3 663
    26-Feb-08 Gill 10 762
    22-Oct-08 Jones 5 425
    08-Nov-08 Doug 1 639
    27-Apr-09 Dave 4 409
    27-Sep-09 Dave 4 612
    01-Sep-08 Brian 6 688
    17-Jun-09 Larry 10 663
    24-Aug-09 Rob 5 608
    23-Jan-08 Morgan 6 388

  25. Lynn says:

    Thank you! I've been struggling with this for ages and today, thanks to this post, I finally figured that I had to customize my toolbar in order to utilise the "Fill" menu. This will make my monthly reports much, much neater

Leave a Reply