Notes
![]() ![]() Notes - notes.io |
Sub MoveRowsToParkedSheet()
Dim wsSource As Worksheet
Dim wsDone As Worksheet
Dim lastRow As Long
Dim i As Long
Dim doneValue As String
Dim recurringValue As String
Dim printValue As String
Set wsSource = ThisWorkbook.Sheets("Parked")
Set wsDone = ThisWorkbook.Sheets("Done")
Set wsTask = ThisWorkbook.Sheets("Task List")
lastRow = wsSource.Cells(wsSource.Rows.Count, "B").End(xlUp).Row
For i = lastRow To 2 Step -1
doneValue = wsSource.Cells(i, 4).Value
recurringValue = wsSource.Cells(i, 5).Value
If doneValue = "Ready" And recurringValue <> "Recurring" Then
wsSource.Rows(i).Copy Destination:=wsTask.Rows(wsTask.Cells(wsTask.Rows.Count, 2).End(xlUp).Row + 1)
wsSource.Rows(i).Delete
End If
Next i
End Sub
——
Module2:
Sub MoveRowsToDoneSheet()
Dim wsSource As Worksheet
Dim wsDone As Worksheet
Dim wsParked As Worksheet
Dim lastRow As Long
Dim i As Long
Dim doneValue As String
Dim recurringValue As String
Dim printValue As String
Set wsSource = ThisWorkbook.Sheets("Task List")
Set wsDone = ThisWorkbook.Sheets("Done")
Set wsParked = ThisWorkbook.Sheets("Parked")
lastRow = wsSource.Cells(wsSource.Rows.Count, "A").End(xlUp).Row
printValue = wsSource.Range("C1").Value
For i = lastRow To 2 Step -1
doneValue = wsSource.Cells(i, 4).Value
recurringValue = wsSource.Cells(i, 5).Value
If doneValue = "Done" And recurringValue <> "Recurring" Then
wsSource.Rows(i).Copy Destination:=wsDone.Rows(wsDone.Cells(wsDone.Rows.Count, 1).End(xlUp).Row + 1)
wsDone.Cells(wsDone.Cells(wsDone.Rows.Count, 12).End(xlUp).Row + 1, 12).Value = printValue
wsSource.Rows(i).Delete
End If
If doneValue = "Parked" And recurringValue <> "Recurring" Then
wsSource.Rows(i).Copy Destination:=wsParked.Rows(wsParked.Cells(wsParked.Rows.Count, 1).End(xlUp).Row + 1)
wsSource.Rows(i).Delete
End If
Next i
End Sub
—
Module3:
Sub RefreshAllPivotTables()
Application.CalculateFull
ActiveWorkbook.RefreshAll
End Sub
——
Parked Tab:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim A As Range: Set A = Range("D:D")
Dim v As String
If Intersect(Target, A) Is Nothing Then Exit Sub
Application.EnableEvents = False
v = Target.Value
If v = "Not Started" Then Target.Offset(0, 5) = Now()
If v = "Pending" Then Target.Offset(0, 6) = Now()
If v = "Done" Then Target.Offset(0, 7) = Now()
Application.EnableEvents = True
Dim Z As Long
Dim xVal As String
On Error Resume Next
If Intersect(Target, Range("D:D")) Is Nothing Then Exit Sub
Application.EnableEvents = False
For Z = 1 To Target.Count
If Target(Z).Value > 0 Then
Call MoveRowsToParkedSheet
End If
Next
Application.EnableEvents = True
End Sub
——
Task list:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim A As Range: Set A = Range("D:D")
Dim v As String
If Intersect(Target, A) Is Nothing Then Exit Sub
Application.EnableEvents = False
v = Target.Value
If v = "Not Started" Then Target.Offset(0, 5) = Now()
If v = "Pending" Then Target.Offset(0, 6) = Now()
If v = "Done" Then Target.Offset(0, 7) = Now()
Application.EnableEvents = True
Dim Z As Long
Dim xVal As String
On Error Resume Next
If Intersect(Target, Range("D:D")) Is Nothing Then Exit Sub
Application.EnableEvents = False
For Z = 1 To Target.Count
If Target(Z).Value > 0 Then
Call MoveRowsToDoneSheet
Call MoveRowsToParkedSheet
Call RefreshAllPivotTables
End If
Next
Application.EnableEvents = True
End Sub
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team