And once again I figured it out.
Set myRng = shB.Range(Cells(1, j), Cells(1, 19))
needed to be
Set myRng = shB.Range(shB.Cells(1, j), shB.Cells(1, 19))
I am having trouble when I run this. It ran Perfect when I Set myRng = ActiveSheet.Range(Cells(1, j), Cells(1, 19)). When I changed is to shB (which is Sheet2) then I get an error, Method Range of Objects. I believe I have a problem defining the range. Just need some help figuring it out. I also...
Thanks for your help I figured it out.... And I didn't use an array; just over thought it.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$3" Then
Dim i As Integer
i = 5
For i = 5 To 19
If (Target.Value) = "close RUN" And Cells(4, i).Value = "RUN" Then...
Here is the updated version. I am probably over complicating it. My goal is to have one group of cells close if it has data and have the other group of cells open if it doesn't have data. (The data is 'RUN' in this situation) This will search and see if the column (j) has data in cell(4,i). If...
I am trying to hide cells that are in my array. I am new to VBA so I am having a little trouble. My code is below. Thanks in advance! My array is in columns E-S and the cells contain letters E-S in it.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$3" Then...