Forum Discussion
Phil Cox
Apr 03, 2021Copper Contributor
Macro button
Hi all. I'm new here. I would like to create a button macro that when I click it, it will go to a cell according to the time (each cell represents a 15 min time) and increase the number in that cell...
- Apr 04, 2021
Near the end of the macro, change the part
With wsData.Cells(r, TimeCol + x) .Value = 1 .Interior.Color = vbYellow End Withto
With wsData.Cells(r, TimeCol + x) .Value = .Value + 1 .Interior.Color = vbYellow End WithAnd near the beginning, the line
If Time > TimeSerial(18, 30, 0) And Time < TimeSerial(5, 30, 0) Thenshould be
If Time > TimeSerial(18, 30, 0) Or Time < TimeSerial(5, 30, 0) ThenSee the attached version with the modified version of Subodh_Tiwari_sktneer's code.
HansVogelaar
Apr 03, 2021MVP
Please attach a sample workbook without sensitive data.