Dear enthusiasts,
Goal: easy one click solution for marking up pivot table for completed tasks and archiving the date of markups.
Description: Trying to create a VBA coded workbook for task management that would enable later tracking of completion dates.
Specs: Sheet1 contains information for tasks to be completed starting with taskId which is unique for every row, other information can be the same or and vary row by row. On Sheet2 the information is displayed in a pivot table by tasks with some additional information, summed up by dates. So if you'd have exact same information on two rows it would sum up in the pivot table.
Progress: I found a piece of code on the internet that helps to mark up the pivot table when clicking on a cell that contains a number bigger than 0, and it also unmarks it if its already marked previously. I know this is not an ideal solution, but it is a start and i would ask help with the search command for VBA. Please see code below.
sheet1.png
sheet2.png
Marking up in progress:
sheet2_a.png
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Me.Range("D:Z")) Is Nothing Then
Cancel = True
Application.EnableEvents = False
If Target.Interior.Pattern = xlNone And Target.Value > 0 Then
Target.Interior.ColorIndex = 6 'yellow
'by value in Sheet2 column C (Task ID)
'search Sheet1
'enter timestamp to according cell in on Sheet1 column F
Else
Target.Interior.Pattern = xlNone
End If
End If
FallThrough:
Application.EnableEvents = True
End Sub
Looking forwards to hearing from you,
UT
Bookmarks