heretolearnexcel
Board Regular
- Joined
- Jan 22, 2019
- Messages
- 61
- Office Version
- 365
- Platform
- Windows
Hi,
I have a Table with days like this:
I need a formula that if x number of days have passed it will do something. For example, if 5 days have passed since last time, "sum these two values"
column A= C+D, if 5 days have passed since last time there was a value in the column:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]DATE[/TD]
[TD="align: center"]Days passed[/TD]
[TD]A[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: right"]1-Jan[/TD]
[TD="align: right"][/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: right"]2-Jan[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: right"]3-Jan[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: right"]4-Jan[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: right"]5-Jan[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: right"]6-Jan[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]14[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: right"]7-Jan[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: right"]8-Jan[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]11[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: right"]9-Jan[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: right"]10-Jan[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: right"]11-Jan[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]13[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: right"]12-Jan[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]19[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: right"]13-Jan[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: right"]14-Jan[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]15[/TD]
[/TR]
</tbody>[/TABLE]
Any ideas on how to achieve this?
Thanks.
I have a Table with days like this:
I need a formula that if x number of days have passed it will do something. For example, if 5 days have passed since last time, "sum these two values"
column A= C+D, if 5 days have passed since last time there was a value in the column:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]DATE[/TD]
[TD="align: center"]Days passed[/TD]
[TD]A[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: right"]1-Jan[/TD]
[TD="align: right"][/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: right"]2-Jan[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: right"]3-Jan[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: right"]4-Jan[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: right"]5-Jan[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: right"]6-Jan[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]14[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: right"]7-Jan[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: right"]8-Jan[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]11[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: right"]9-Jan[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: right"]10-Jan[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: right"]11-Jan[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]13[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: right"]12-Jan[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]19[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: right"]13-Jan[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: right"]14-Jan[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]15[/TD]
[/TR]
</tbody>[/TABLE]
Any ideas on how to achieve this?
Thanks.
Last edited: