I am trying to build a worksheet that allows me and my colleagues to fill in variables in a worksheet, as one would do during an intake conversation with a customer. I have succeeded so far, but the macro has become very very slow... I already disabled ScreenUpdating, DisplayPageBreaks, Calculation and Events.
Actually, I am pretty sure it takes so long because of the extensive Private Sub Worksheet_Change. I use some initial formatting for when the cell is still empty, so that my colleagues know what to put in the cell. But this process is repeated individually for about 170 rows. It looks like this:
Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(19,3).Value="" Then Cells(19,3).Value="Fill in x.."
Cells(19,3).Font.Fontstyle = "Italic"
Cells(19,3).Font.ColorIndex = 16
If Cells(20,3).Value="" Then Cells(20,3).Value="Fill in y.."
Cells(20,3).Font.Fontstyle = "Italic"
Cells(20,3).Font.ColorIndex = 16
If Cells(25,2).Value="" Then Cells(25,2).Value="Fill in z.."
Cells(25,2).Font.Fontstyle = "Italic"
Cells(25,2).Font.ColorIndex = 16
If Cells(70,3) = True Then Cells(70,3).Value = "Comment.."
If Cells(70,3) = False Then Cells(70,3).Value = ""
Cells(70,3).Font.Fontstyle = "Italic"
Cells(70,3).Font.ColorIndex = 16
And this goes on for lots of other cells. I would like to explore whether it is possible to only run pieces of the Private Sub Worksheet_Change at the time. For example, that it only checks whether a cells changes in the chapter that the person in currently working in. Could someone help me with this, or put me in the right direction?
Thanks in advance!