Hello Everyone,
I'm fairly stuck on this.
Range J12:R30 has dynamic data so sometimes certain cells contain values other times they don't (and what not). All cells start off with no fill.
Current code:
I really appreciate any help with this
Thanks
I'm fairly stuck on this.
Range J12:R30 has dynamic data so sometimes certain cells contain values other times they don't (and what not). All cells start off with no fill.
Current code:
- If a selected cell contains a value then it turns green and runs a macro
- If the selected cell is already green (macro has already ran) then the macro won't run
- If no value in selected cell then macro won't run.
- If no value in certain cells outside of Range J12:R30 then macro won't run
- To be able to select a green cell (only a green cell in Range J12:R30) and turn it back to nofill and then run a separate macro (we can call it "Remove post")
- But macro "Remove post" can only run if the cell was already green and is now nofill
I really appreciate any help with this
Thanks
VBA Code:
Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Intersect(Target, Range("J12:R30")) Is Nothing Then Exit Sub
If Worksheets("TrainingMgn").Range("E10") <> "" Then
If Worksheets("TrainingMgn").Range("E12") <> "" Then
If Target.Interior.Color = 16777215 Then
Application.Calculation = xlAutomatic
Call SetPosition
If Worksheets("TrainingMgn").Range("K8") <> "" Then
Call SendNewTrainingSpecsToPreTable1
Target.Interior.Color = vbGreen
End If
End If
End If
End If
End If
End Sub