Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Excel Solutions 2016.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
813.06 Кб
Скачать

Similar tasks

To edit names once they are created, use Insert-Name-Define menu command (03) of Name Manager ribbon command (07/10). Name Manager is a convenient interface to edit many names at once. For Excel 2003, you can install an add-in by Jan Karel Pieterse that creates a Name Manager interface.

It is best to follow certain best practices when using names:

  1. Names are great if not overused. If you have a variable that is repeatedly called many times over in a sheet of workbook, this is probably a good name target. If you are referring to a cell just once, better leave it as is.

  2. Names should be brief but descriptive. By looking at a name, you should at least understand what it may mean. Names that are too abstract or too abbreviated will keep confusing you.

  3. Groups of similar names can be identified by a prefix. For example, if you have several lists, you can start all of their names with l_ - e.g. l_units, l_prices and so on. This way, that will stick together in the list and in the Name Manager.

For other operations with names, refer to Define and use names in formulas | Online Office Help from Microsoft.

A dynamic date range

Tools: functions DATE, YEAR, MONTH, DAY, TODAY

Level: intermediate

Problem

You need to make a project timeline with monthly intervals. You do not know, however, when the project will actually start. It may be this month, next month or even next January. Given that your model will be reviewed in many meetings, you will need to update the timeline every time you take it anywhere. Worse, your boss might take it to meetings too, and you cannot rely on her updating the timeline.

How do you make a formula that automatically starts the project timeline from the first day of the month immediately following this month?

Solution

We will use several built-in Excel date and time functions. In particular, we will need TODAY(), YEAR(), MONTH(), DAY() and DATE(). For simplicity's sake, let's also number future monthly periods – 1,2,3,4 and so on and enter them in cells A6 and down column A.

  1. Enter function =TODAY() in cell B1. It requires no arguments and only displays the current date. Excel date is a serial number. Excel considers January 1, 1900, to be day number 1, January 2, 1900 day number 2 and so on. The dates from year 2012 already exceed 40 000.

  2. Enter function =YEAR(B1) in cell B2. YEAR returns the year of a date as number.

  3. Enter function =MONTH(B1) in cell B3. MONTH returns the month of a date as number.

  4. Enter function =DAY(B1) in cell B4. DAY returns the day of a date as number. You have now the today's date properly broken into year, month and day. Every day, these figures will change, as TODAY() function that they refer to will return new value.

  5. Now, let's reconstruct the first of next month from these dynamic variables. Enter function =DATE($B$2,$B$3+A6,1) in cell B6.

  6. Copy cell B6 down column B. You now have a range of cells in column B with future period dates.

A

B

1

Today's date

=TODAY()

2

Today's year

=YEAR(B1)

3

Today's month

=MONTH(B1)

4

Today's day

=DAY(B1)

5

Period

Period date

6

1

=DATE($B$2,$B$3+A6,1)

7

2

=DATE($B$2,$B$3+A7,1)

8

3

=DATE($B$2,$B$3+A8,1)

9

4

=DATE($B$2,$B$3+A9,1)

We could have also embedded all the intermediate calculation in the DATE() function; the only reason not to do so is make the formula more understandable at this point.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]