Increasing numbers by day

J

Jeffe

How can I get a cell to increase day by day automatically
and how can I create a fuction which will take cell value
from the previous day and roll it over in a different cell
the next day.
 
H

Harald Staff

Only with a macro and an additional date stamp cell as far as I know. Would that be an
option, or is this for a "please no macros" environment ?
 
G

Guest

Does the cell that increases in value increase the same
amount each day? When you say roll ove a value from the
previous day to a different cell, do you mean to copy it
to another cell? for example, if cell A2 contains the
value 45 today, do you want that value to be copied to
another cell when you open the spreadsheet tomorrow?
LEB
 
J

Jeffe

Macro's are fine. I have no problem using a date stamp
cell. I am calculating an engine report which is
submitted each day and I would like to have to input as
little info as possible. several fields requires the
previous days numbers I would like to be able to roll
those over each day. I also need to calc hours each day,
which means then have those numbers roll over and calc
hours until next service. Please provide help if you
can. Thank you
Jeffe
-----Original Message-----
Only with a macro and an additional date stamp cell as
far as I know. Would that be an
 
J

Jeffe

Your example is exactly one of the things I will need. I
will also need to add up different values each day but
each day as I input those numbers in one cell i will need
a running total in another cell.
Thank you for the help.
Jeffe
 
H

Harald Staff

Hi Jeffe

I hope this get you started.
It loops sheet 1 rows 1 to 10. If A cell < today then C cell = B cell and B cell = B cell
+ 1. Paste the code into the ThisWorkbook module to make it run itself on file opening.

Private Sub Workbook_Open()
Dim R As Long 'Row number
With Sheets(1)
For R = 1 To 10
If .Cells(R, 1).Value < Date Then
.Cells(R, 1).Value = Date
.Cells(R, 3).Value = .Cells(R, 2).Value
.Cells(R, 2).Value = .Cells(R, 2).Value + 1
End If
Next
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top