T
T
Teslaboy12020-11-29 01:09:32
Google Sheets
Teslaboy1, 2020-11-29 01:09:32

How to make a cell change automatically every day in google sheets?

Task :
The company has 25 working days (Cell B1). Sales plan, forecasts... are calculated depending on the days worked in cell (B2), but they are not equal to the calendar days to make the formula based on dates.
Every day, the value of the days worked is inserted into the cell (B2): 1, 2, 3 ... (maximum number 25) manually .

Question : Is it possible to automate the process of filling the cell (B2) so that the formula itself changes the value by +1 every day , but is limited to the value 25?

I tried to bind the values ​​​​TODAY, but there are 31 days, Sundays are considered days off in the company. In general, I can not solve the problem.

5fc2c9df2187f050733601.png

Answer the question

In order to leave comments, you need to log in

5 answer(s)
E
Eugene, 2020-11-29
@Teslaboy1

The number of working days in the current month can be calculated by the formula:

=NETWORKDAYS.INTL(EOMONTH(TODAY();-1)+1;EOMONTH(TODAY();0);"0000001";F1:F)

where in the penultimate argument "0000001" you can specifically specify which of the days of the week is the day off (in my example, the 7th day, marked by one). As the last argument, the range is specified, in which you need to enter all holiday dates in the column.
In cell B2, the following formula calculates the number of days worked until today (including weekends and holidays):
=NETWORKDAYS.INTL(EOMONTH(TODAY();-1)+1;TODAY();"0000001";F1:F)

G
Grigory Boev, 2020-11-29
@ProgrammerForever

=ЕСЛИ((СЕГОДНЯ()-$A$2)>$A$1;$A$1;(СЕГОДНЯ()-$A$2))
, where $A$1 is a reference to the number of days
$A$2 is a conditional "0", from which we count days

M
Mikhail Vasilyev, 2020-11-29
@vasilyevmn

=ЕСЛИ(ДЕНЬ(СЕГОДНЯ())>25;25;ДЕНЬ(СЕГОДНЯ()))

B
BasiC2k, 2020-11-29
@BasiC2k

You can create a daily trigger that will run a function that adds +1 to a cell

T
Teslaboy1, 2020-11-29
@Teslaboy1

Eugene, great idea!
The only thing is, is it possible to add extreme days to the calendar month so that the weeks are complete?
For example, in December, in my company, working weeks are considered from Monday to Saturday, and in your decision, I have 30.11 and 1.12-2.12
5fc3dee5c7c97294701491.png.
Is it possible to add certain days to the formula, even if they have to be entered in a separate column?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question