Hi all, Have a simple Table1 where in column C are Dates, in column D Status, and Column E Update.
What I wish for is that when a cell in Column E changes its value (it's data validation list) to do this:
Add value of cell to cell in column C (simple C.value=C.value+E.value*7)
Check if E.value was positive, if so
Find first "Priority" in D Status column, assign previous date value of changed cell
and at the end for any case
Set value of cell in E as blank
ex.
Initial
....A........B.......C.........D......E
[TABLE="class: grid, width: 50, align: left"]
<tbody>[TR]
[TD]Test1[/TD]
[TD]Test1[/TD]
[TD]28.1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test2[/TD]
[TD]Test2[/TD]
[TD]28.2[/TD]
[TD][/TD]
[TD]E2[/TD]
[/TR]
[TR]
[TD]Test3[/TD]
[TD]Test3[/TD]
[TD]28.3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test4[/TD]
[TD]Test4[/TD]
[TD]28.4[/TD]
[TD]Priority[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test5[/TD]
[TD]Test5[/TD]
[TD]28.5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Let say we change E2 to -2
....A........B.......C.........D......E
[TABLE="class: grid, width: 50, align: left"]
<tbody>[TR]
[TD]Test1[/TD]
[TD]Test1[/TD]
[TD]28.1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test2[/TD]
[TD]Test2[/TD]
[TD]14.2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test3[/TD]
[TD]Test3[/TD]
[TD]28.3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test4[/TD]
[TD]Test4[/TD]
[TD]28.4[/TD]
[TD]Priority[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test5[/TD]
[TD]Test5[/TD]
[TD]28.5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Date has updated by -2*7 days, now what if it was initially 2 in E2
....A........B.......C.........D....E
[TABLE="class: grid, width: 50, align: left"]
<tbody>[TR]
[TD]Test1[/TD]
[TD]Test1[/TD]
[TD]28.1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test4[/TD]
[TD]Test4[/TD]
[TD]28.2[/TD]
[TD]Priority[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test2[/TD]
[TD]Test2[/TD]
[TD]14.3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test3[/TD]
[TD]Test3[/TD]
[TD]28.3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test5[/TD]
[TD]Test5[/TD]
[TD]28.5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Test4 took a place of Test2
The rest got auto sorted by date
I thought it's gonna be easy, started to make a code, but just keep on getting error after error and crashes.
Any help?
Thanks
What I wish for is that when a cell in Column E changes its value (it's data validation list) to do this:
Add value of cell to cell in column C (simple C.value=C.value+E.value*7)
Check if E.value was positive, if so
Find first "Priority" in D Status column, assign previous date value of changed cell
and at the end for any case
Set value of cell in E as blank
ex.
Initial
....A........B.......C.........D......E
[TABLE="class: grid, width: 50, align: left"]
<tbody>[TR]
[TD]Test1[/TD]
[TD]Test1[/TD]
[TD]28.1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test2[/TD]
[TD]Test2[/TD]
[TD]28.2[/TD]
[TD][/TD]
[TD]E2[/TD]
[/TR]
[TR]
[TD]Test3[/TD]
[TD]Test3[/TD]
[TD]28.3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test4[/TD]
[TD]Test4[/TD]
[TD]28.4[/TD]
[TD]Priority[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test5[/TD]
[TD]Test5[/TD]
[TD]28.5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Let say we change E2 to -2
....A........B.......C.........D......E
[TABLE="class: grid, width: 50, align: left"]
<tbody>[TR]
[TD]Test1[/TD]
[TD]Test1[/TD]
[TD]28.1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test2[/TD]
[TD]Test2[/TD]
[TD]14.2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test3[/TD]
[TD]Test3[/TD]
[TD]28.3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test4[/TD]
[TD]Test4[/TD]
[TD]28.4[/TD]
[TD]Priority[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test5[/TD]
[TD]Test5[/TD]
[TD]28.5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Date has updated by -2*7 days, now what if it was initially 2 in E2
....A........B.......C.........D....E
[TABLE="class: grid, width: 50, align: left"]
<tbody>[TR]
[TD]Test1[/TD]
[TD]Test1[/TD]
[TD]28.1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test4[/TD]
[TD]Test4[/TD]
[TD]28.2[/TD]
[TD]Priority[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test2[/TD]
[TD]Test2[/TD]
[TD]14.3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test3[/TD]
[TD]Test3[/TD]
[TD]28.3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Test5[/TD]
[TD]Test5[/TD]
[TD]28.5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Test4 took a place of Test2
The rest got auto sorted by date
I thought it's gonna be easy, started to make a code, but just keep on getting error after error and crashes.
Any help?
Thanks
Last edited: