Object required, fault 'No 424'

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
 
N

Norman Jones

Hi April27,
strTeststartDatumAddress = rng.Offset(i + 1, 0).Address

You have not set the rng variable to a range.

I have not sought to understand your code, but perhaps rng was intended as
rng1?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

comparing data 3
Looper Blooper 1
Filtering/Excluding Values 1
Loop and name 3
Word macro that can call cells out of Excel for a find and replace 0
I have a rng problem 2
Making charts 0
Object Required Error 7

Top