Hi Paul_Hossler,
I have in the meantime sorted the population of the 2's. I do have a code that hiders columns and also inserts text, so I modified the code to also now insert 2's. My problem is that the code works nicely when it runs alone, but I want it merged with the other code as well. I have tried various things, keep getting all sorts of errors, so if you could just help me out to merge these 2 codes, I will be happy..
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Cell As Range, NARange As Range
Set Target = Intersect(Target, Target.Parent.Rows(2))
If Not Target Is Nothing Then
For Each Cell In Target
If Cell.Value = 0 Then
Cell.EntireColumn.Hidden = True
Set NARange = Intersect(Cell.EntireColumn, Range("B3:AT137,CR3:EJ43"))
If Not NARange Is Nothing Then NARange.Formula = "na()"
Else
Cell.EntireColumn.Hidden = False
End If
Next Cell
End If
End Sub
[CODE]
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Cell As Range, NARange As Range
Set Target = Intersect(Target, Target.Parent.Rows(2))
If Not Target Is Nothing Then
For Each Cell In Target
If Cell.Value = Range("AV1").Value Then
Set TwoRange = Intersect(Cell.EntireColumn, Range("B3:AT137,CR3:EJ43"))
If Not twoRange Is Nothing Then TwoRange.Value = 2
Else
'Do Nothing
End If
Next Cell
End If
End Sub
[CODE]