A
april27
Hi. I am trying to make a loop in which I want to search for 1) The word
"Date" 2) If this is found I want to check the cells in the same column but
different rows than "Date". This is to check where the list ends. However
when doing this check I want to compare a predefined value (found in
startDatumArr(1)) with the values in the cells that I am checking. If this
"match" is found I want to be able to get address of the cell that
corresponds to the predefined value. However, when looping I get an error
message saying: 'Object required' Fault No 424. What does it mean and how do
I solve it? (rng1 is defined as Range and startDatumArr(1) as Variant).
Please please help me. Any assistance is very much appreciated!!!
Set rng1 = Worksheets("Indata").Cells.Find("Date", LookIn:=xlValues)
Set rng2 = Worksheets("Indata").Cells.Find("QC", LookIn:=xlValues)
If rng1 Is Nothing Then
MsgBox ("Date cannot be found!")
Else
i = 0
Do Until IsEmpty(rng1.Offset(i + 1, 0)) = True
If rng.Offset(i + 1, 0) = startDatumArr(1) Then
strTeststartDatumAddress = rng.Offset(i + 1, 0).Address
i = i + 1
Else
i = i + 1
End If
Loop
"Date" 2) If this is found I want to check the cells in the same column but
different rows than "Date". This is to check where the list ends. However
when doing this check I want to compare a predefined value (found in
startDatumArr(1)) with the values in the cells that I am checking. If this
"match" is found I want to be able to get address of the cell that
corresponds to the predefined value. However, when looping I get an error
message saying: 'Object required' Fault No 424. What does it mean and how do
I solve it? (rng1 is defined as Range and startDatumArr(1) as Variant).
Please please help me. Any assistance is very much appreciated!!!
Set rng1 = Worksheets("Indata").Cells.Find("Date", LookIn:=xlValues)
Set rng2 = Worksheets("Indata").Cells.Find("QC", LookIn:=xlValues)
If rng1 Is Nothing Then
MsgBox ("Date cannot be found!")
Else
i = 0
Do Until IsEmpty(rng1.Offset(i + 1, 0)) = True
If rng.Offset(i + 1, 0) = startDatumArr(1) Then
strTeststartDatumAddress = rng.Offset(i + 1, 0).Address
i = i + 1
Else
i = i + 1
End If
Loop