D
Dennis Allen
Hi. I have a workbook with 400 sheets. Each sheet contains an area for log entries (A11510). (A11:A510) is a Y/N column,
(B11:B510) is the log date column. In cell C4 I want to display the latest log entry date, whose A column is marked Y. I was
thinking =LastPM(), as in:
Public Function LastPM()
LastPM = 0
i = 11
Do While i <= 510 And Cells(i, "B") > 0
If Cells(i, "A") = "Y" Then
LastPM = Cells(i, "B")
End If
i = i + 1
Loop
End Function
Problem. Suppose the user adds a new log row entry. How can I get C4 to recalulate LatestPM()? What's the best way? Any advice
would be helpful...Dennis
(B11:B510) is the log date column. In cell C4 I want to display the latest log entry date, whose A column is marked Y. I was
thinking =LastPM(), as in:
Public Function LastPM()
LastPM = 0
i = 11
Do While i <= 510 And Cells(i, "B") > 0
If Cells(i, "A") = "Y" Then
LastPM = Cells(i, "B")
End If
i = i + 1
Loop
End Function
Problem. Suppose the user adds a new log row entry. How can I get C4 to recalulate LatestPM()? What's the best way? Any advice
would be helpful...Dennis