If you want to find a date after a certain number of workdays, you can use the WORKDAY function. You just need the start date and the number of working days (Fig. 1).
Date after X work daysFig. 1 WORKDAY function
We can see that Excel shows the date after the corresponding number of working days. You have to remember that the WORKDAY function doesn’t consider the start date in its calculations. It means that if you have only one workday, you will go to the next working day (Fig. 2).
Fig. 2 Next working day
In the WORKDAY function, you can even add holidays by just selecting a range with proper dates. Remember to lock it (F4) (Fig. 3).
Fig. 3 Adding holidays
We can see that our dates are a bit changed (Fig. 4).
Fig. 4 Dates changed
The WORKDAY function considers the weekend as Saturday and Sunday, which is correct in most of the countries, however we can modify it. When we want only Sunday to be our weekend, we have to choose the WEEKDAYS.INTL function. The function consists of the start date and the number of working days. The third argument is the weekend, where we can change the weekend days. Let’s choose Sunday (Fig. 5).
Fig. 5 Sunday as the weekend
Then, we are choosing holidays by selecting a proper range and locking it (F4 key). Our formula is ready (Fig. 6).
=WORKDAY.INTL(A2,B2,11,$F$2:$F$3)
Fig. 6 Our formula
We can see that our results differ from the the previous ones because now Saturday is our working day (Fig. 7).
When we want to count the number of working days between two dates we can use the NETWORKDAYS function. The function is very simple, as it needs only the start and end dates. And that’s it (Fig. 1).
Number Of Working Days Between Two Dates
=NETWORKDAYS(A2,B2)
Fig. 1 NETWORKDAYS function
And we have the numbers of working days between two dates. It’s important that the NETWORKDAYS function considers also the start and end days. If the start and end days are the same, the number will tell us whether the day is a working day or not (Fig. 2).
Fig. 2 Working days
We can also add holidays to this function in the third argument. We just have to select a range with proper dates and press the F4 key to lock it (Fig. 3).
=NETWORKDAYS(A2,B2,$F$2:$F$3)
Fig. 3 Holidays
Now, we can see that the number of days changed due to those holidays (Fig. 4).
Fig. 4 Changed numbers
In the NETWORKDAYS function, the weekend is considered as Saturday and Sunday. However, we can modify it by using the NETWORKDAYS.INTL function. The syntax of those two functions is almost the same. Apart from the start and end day, we can choose what our weekend days will be. Let’s choose Sunday only (Fig. 5).
Fig. 5 NETWORKDAYS.INTL function
Then, we can add holidays if we want. Let’s select the proper holiday range and press the F4 key to lock it (Fig. 6).
=NETWORKDAYS.INTL(A2,B2,11,$F$2:$F$3)
Fig. 6 Function with holidays
And we have our results. We can see that the number of working days between the dates grew because Saturday is a working day (Fig. 7).
Today, we are going to learn how to group columns and rows. In our example, we have month by month sales, and their summaries by the first quarter, the second quarter and half a year with the use of the SUBTOTAL function.
How to group columns and rowsFig. 1 Columns
Sometimes, we don’t want to show lower values, i.e. values from individual months. We can do it by hiding those columns (Fig. 2).
Fig. 2 Hide option
And sometimes, we want to show those values (Fig. 3).
Fig. 3 Unhide option
Those tasks, however, can sometimes be a bit tedious. That’s why we are going learn how to group those columns to make it simpler. First, you have to select the columns you want, then go to the Data tab and click on the Group command. Now, we can see a line above column names, which allows us to hide the columns just by clicking on the minus sign (Fig. 4).
Fig. 4 Grouped columns
We can also unhide them by clicking on the plus sign (Fig. 5).
Fig. 5 Unhiding the grouped columns
Now, the task is quite simple. You can hide or unhide many columns at once. We can group even more columns this way, however, it’s important to have a space of at least one column between those groups so that Excel doesn’t combine those groups in one (Fig. 6).
Fig. 6 Groups separated by one column
When we want to ungroup our data, there is a simple solution. You have to go to the Data tab, expand the Ungroup command, and choose the Clear Outline option (Fig. 7). This way, Excel will clear all groups in the sheet. Usually, it’s easier to clear all groups and start creating new groups from the beginning than trying to fix it.
Fig. 7 Ungrouping data
Due to the fact that our values are combined from different columns, we can make Excel group the values for us. You just select any cell, go to the Data tab, expand the Group command and choose the Auto Outline option (Fig. 8).
Fig. 8 Auto Outline option
This way, Excel has created three groups for us. Those groups aren’t on the same level because each lower level group combines three columns, and the upper level group combines all the columns from the lower groups and a few more (Fig. 9).
Fig. 9 Groups on different levels
When we click on the group level number, Excel will expand or collapse all groups in this level (Fig. 10).
Fig. 10 Group level numbers
Now, let’s group some rows. We don’t have any function that sums up or combines rows, so we have to do it manually. We have to select the rows we want, then go to the Data tab, then the Group option (Fig. 11).
Fig. 11 Row grouping
If we select a range, not whole columns or rows and press the Group command, Excel doesn’t know which ones we want to group. Then we have to select the proper radio button (Fig. 12).
Fig. 12 Selecting the proper option
We can also select more rows and group them by pressing the Group option to create a group on a higher level. This group will consist of groups from a lower level. We can expand and collapse them the using also level number buttons (Fig. 13).
Today, we are going to make a simple trick, i.e. linking the Chart Title with a value from a cell. It will make the Chart Title a bit more dynamic. The task is simple. We have to select the chart, so that it has solid borders. We go to the Chart Title edit mode. As we can see, the Chart Title borders change into a dotted line, which we don’t want. We have to click something else on the chart, then click again on the chart title one time, so that the borders stay solid (Fig. 1).
Dynamic chart title, link chart title with a value from the cellFig. 1 Solid borders
Now, we have to click the equal sign, which will appear in the formula bar (Fig. 2).
Fig. 2 Equal sign
We are starting to write a formula for the Chart Title. We are clicking cell A1 because we want to have reference to this cell. Then, we are pressing Enter to link the Chart Title to this cell (Fig. 3).
Fig. 3 Chart Title linked to cell A1
When we change a value in the cell, the Chart Title also changes (Fig. 4).
Fig. 4 Chart Title changes
This simple trick works also with Axis title. We have to select the Axis title (Fig. 5).
Fig. 5 Selected Axis title
Then, write the equal sign and select a proper cell. In our case it’s A10. After entering it, the Axis title changes (Fig. 6).
Fig. 6 Axis title changed
We can do the same with the bottom Axis title (Fig. 7).
Fig. 7 Bottom Axis title changed
That’s how you connect the Chart title and Axis titles to values from cells.
Sometimes, we want to get the first day of the next month. I will show you two solutions how to calculate this date in Excel. The first solution uses the DATE function. It needs the number of days, months and years. First, we will write the number of years, which we can extracted from the current date using the YEAR function (Fig. 1).
First day of the next month
=DATE(YEAR(A2
Fig. 1 DATE function
The same case is with the month number. We are using the MONTH function and extracting the number from the date. However, we have to remember that we want to have the next month. That’s why we are adding +1. It’s important that the DATE function will work with numbers larger than 12. It will just go to the next year, or the previous one if the number is lower than zero. Then, we are putting 1 because we want the first day of the month. And just like that, we have the whole formula (Fig. 2).
=DATE(YEAR(A2),MONTH(A2)+1,1)
Fig. 2 The whole DATE formula
After entering and copying it down, we have the results (Fig. 3).
Fig. 3 DATE formula results
If we want to go further into the future, we just have to add more months, let’s say 3 (Fig. 4).
=DATE(YEAR(A2),MONTH(A2)+3,1)
Fig. 4 More into the future
We can see that the function goes to next years in certain dates (Fig. 5).
Fig. 5 Next years in some dates
If we want to go back in time, we have to subtract a number, let’s write ‑3 (Fig. 6).
=DATE(YEAR(A2),MONTH(A2)-3,1)
Fig. 6 Going back in time
And we are in the past. As we can see, the number of years is also calculated analogically (Fig. 7).
Fig. 7 In the past
The second solution uses the EOMONTH function. We have our starting day and the number of months we are moving. Since we want to have the fist day of the next month, first, we need to go to the last day of the current month (Fig. 8).
=EOMONTH(A2,0)
Fig. 8 EOMONTH function
And we have the last day (Fig. 9).
Fig. 9 The last day
However, we want the day after, so we have to add 1 (Fig. 10).
=EOMONTH(A2,0)+1
Fig. 10 Adding 1
Now, we have the first days of the next months (Fig. 11).
Fig. 11 The first day of the next months
When we want to have the first day of the month that is three months into the future, we just have to add 2 months in the second argument of the EOMONTH function. It’s because we will go 2 months into the future, and then we have +1 at the end, so it sums up to 3 months (Fig. 12).
=EOMONTH(A2,2)+1
Fig. 12 3 months into the future
And we have proper dates (Fig. 13).
Fig. 13 Proper dates
Analogically, when we want to go back in time, we need to write one month more than we really want as a negative number because we are going to the last day of the month and then we are adding 1, so in total we are going back 3 months (Fig. 14).
=EOMONTH(A2,-4)+1
Fig. 14 3 months into the past
And we have the solution (Fig. 15).
Fig. 15 Solution
The results are the same, so it’s up to you which solution you will choose.