Ok, Ok, Chandoo.org is clearly a Microsoft Excel centric Blog.
But a week ago Pradeep asked the question in a post, “How do I add up a Table of Numbers in Word?”
There are 3 easy answers, which will all be addressed in this post:
- Transfer the Data to/from Excel
- Embed a Table in Word from Excel
- Do the Maths in Word
Transfer Data To/From Excel
The easiest and sometimes quickest way to do maths on a table of numbers is to:
- Copy the Table from Word and paste the Table into an Excel Workbook
- Perform the Maths in Excel
- Copy and paste the results back
Here is a typical Table within Word
Select the Table in Word and press either Ctrl+C or use the Copy
icon.
Open Excel or switch to Excel using Alt+Tab
Select a cell and press Paste Ctrl+V or use the Paste
Icon
Excel shows the Table as above.
Next add formulas to perform the calculations you need
In this case in C9: =SUM(C4:C8)
Copy the formula in C9 across to D9
In E4: =D4/C4
Copy the formula in E4 down to E9
Format the new results as appropriate
Next select either the full table or a section, ie: The Numbers and Copy using either Ctrl+C or use the Copy
icon.
Switch to Word using Alt+Tab
Select the same area in the Word Table as what you copied in Excel
and press Paste Ctrl+V or use the Paste
Icon 
When to use this technique
This technique is useful for doing one of reports where the data is provided to you as is.
It is also good when you need to perform complex formulas.
However when you control the data source there is an easier way and this is discussed next.
Embed the Table in Word from Excel
In cases where you manage the data source, you can link the table in Word directly to the data source in Excel.
By doing this the Word Table is updated as soon as changes are made in the Excel Table.
In Excel find your source data:
Select the range you want to embed into the word Document
Copy this range using either Ctrl+C or use the Copy
icon.
Open Word or Switch to Word using Alt+Tab
Locate and click in the area in the Word Document where you want to place the report
Goto the Home Tab and press Paste Ctrl+V or use the Paste
Icon
Select the Paste and Keep Source Formatting option
Note 1: As you move across the 6 paste options word will show you what the Pasted range will look like using each format
Note 2: Notice in the example above the pasted range also includes the grey grid lines. If you don’t want these you need to disable them in Excel before you copy the range
Now that we have our Word Document with the new Range pasted in, you notice that there is a mistake in the data
Return to Excel by Using Alt+Tab
Change the Date to the 18 Aug 2018 and change the Revenue on Tuesday to 3000
Return to Excel by Using Alt+Tab
Notice that the Date, Tuesday Revenue and Unit Revenue have all changed to reflect the changes in the excel Document.
You can reformat the Table in Word and only the numbers and text will change in response to changes in the Excel Document
The Excel and Word Files must be open for the link to be updated dynamically.
If the Excel file is closed the Word file will not update.
When to use this technique
This is a great technique when you have a large data source with mutiple tables used in Word, Like a Monthly Report.
But there is an alternative…
Perform the Maths in Word
Microsoft Word has limited arithmetic abilities built in.
These abilities only apply to data stored in Tables, not to data stored in tabular format within normal text
Open a word file and enter a Table of Data like below
This is the same table we have seen before.
It requires a Total Line as well as Unit Revenue calculations
Click into the Sales Quantity Weekly Totals cell.
Now goto the Layout Tab and select the Formula icon.
In the Formula: dialog Word will have inserted a Formula =SUM(ABOVE)
This is what we want to do, so leave it
Select an appropriate Number format from the Number format drop down. These number formats are in the same style as Excel Custom Number Formats.
Click OK
Word puts the total 750 in this case in the Total cell
Change a Number above and watch as the Total changes
Repeat the previous step in the revenue Weekly Total cell
The Unit Revenue will be the Revenue for each day divided by the Sales Quantity that day.
That is, for Monday, we want to divide the Sales Revenue of $2,000 by the Sales Quantity 100 to return a Unit Revenue of 200
Luckily Word has the facility to treat Cells in a Table in a similar fashion to Excel !
We can use either R1C1 or A1 formula formats.
In R1C1 each column and row is simply numbered as shown below
In A1 each column is Labelled alphabetically as in the default view in Excel and row is numbered as shown below
And Word is actually more advanced than Excel as you can use either format at the same time without having to change the format in settings.
In our example we want to divide the Cell in Row 2 Column 3 (R2C3) by the value in Row 2 Column 2 (R2C2)
Click in the Cell under the Unit Revenue column header in Row 2
Goto the Layout Tab and select the Formula icon
By default Word will display a =SUM(LEFT) formula
Overwrite this with your own formula =R2C3/R2C2
Select an appropriate Number format and press OK
You can use the A1 formula style by simply using it
Click in the Cell under the Unit Revenue column header in Row 2
Goto the Layout Tab and select the Formula icon
By default Word will display a =SUM(LEFT) formula
Overwrite this with your own formula =C2/B2
Select an appropriate Number format and press OK
Repeat this for the other cells in the Unit Revenue column.
Voila !
You now have a Table in Word, the Total and Unit Rates are Formulas.
But wait there is a mistake, The Revenue on Tuesday should be $5,000
Select the cell and change the value to 5,000
Depending on which version of Word you have the Table will either Update Automatically or you can force it to recalculate
If you Change the Value and the Table updates itself, Enjoy it
If your Table hasn’t updated itself you have a few options
Select the cells by Left Click and Drag ie: From 5,000 Down to the base of the table and across to the Right
Now Right click the selection and select Update or press F9
You can also click on an individual cell within the Table and Right Click and Update
Or you can press Ctrl+A outside the Table and Right Click and Update or Press F9
What Other Functions are Available?
We saw in the example above that we can use basic operands of +, –, * and /
We used the function Sum()
But there are about a dozen other functions available to us to construct formula to process our data
To see and use these Goto the Layout Tab and select the Paste function dropdown on the Formula Dialog.
Scroll down to see other functions
You can build up a function as you do in Excel using parenthesis and these functions.
In the example above we used the special Above range to specify that we wanted to Sum the values Above the active cell.
You can also use the LEFT, RIGHT, ABOVE, BELOW positional arguments
If you have defined Bookmarks within the Word document you can also use these to return values
=ROUND(NPV,0)
Where NPV is a Bookmark to the value of the NPV elsewhere in your Document.
Further Help
Word has a good discussion on the techniques available in the online help
Microsoft Word – Formula in a cell help
Final Comments
How have you performed maths on data in Word?
Let us know in the comments below:





































35 Responses to “Skip weekends while autofilling dates in excel”
[...] Original post by Chandoo [...]
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.
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?
Hi Mihai... you can use pattern fill feature to do this. Simply follow steps in below demo.
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
@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...
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...
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...
@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.
@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
@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.
@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.
Thanks Robert, Chandoo.. I will try the things.. 🙂
I tried it and this time it worked.. Thanks to both of you.. you guys made my life much more easier 🙂
[...] 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. [...]
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!
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...
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
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
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.
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.
Hi, Kamlesh, before i was using "workday" instead of "weekday" but it didn't work.
thanks for sharing the right formula.
At this moment I am going to do my breakfast, when having my breakfast
coming yet again to read further news.
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
@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)
Thanks for replying
Get #NAME? in return when using NETWORKDAYS.INTL
But get 7 with NETWORKDAYS
why ??
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 ?
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 ?
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
Dear Sir,
I want to make a series of December month which will show all the dates without Fridays.
Is it Possible sir??
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)
Thank you, Thank you very much sir. it worked perfectly & I was expecting something like that.
i want to make a template with date that skips fortnightly is it possible in excel
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
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