English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

If I have a date given in one field and a static sales target for every month of an equal amount let’s say 1000 - how can I multiply the sales target figure with the number of the month in the current year.

Example: the date is 23/03/07 sales target is 1000 every month
I want to the cumulative sales target to show 3000 (March = 3)x1000, for June it would be 6000 (June = 6)x1000.

Does anyone know the syntax on how to turn the month reflected within a date and turn it into an integer (from 1-12) that can be used in such a calculation as above?
It should be agnostic of the year (i.e. January in the following year should be a 1 again, not month 13). The calculation should be done in the cell, not a macro.

Thanks for your help.

2007-04-02 02:24:08 · 2 answers · asked by Der Koelner 2 in Computers & Internet Programming & Design

2 answers

Use the Month function. Eg using the following formula:
=Month(A1)
will give you the month of the date in cell A1, from 1-12.
In case you need it, you can also use Day() or Year() to get the respective day or year value as well.

2007-04-02 02:33:43 · answer #1 · answered by oracle128au 7 · 2 0

To get the month of a given date, you use month(date) it will return an integer.
So if your date is in a cell B4, you could do month(B4)

2007-04-02 02:35:39 · answer #2 · answered by Vegan 7 · 0 0

fedest.com, questions and answers