if statement with date format

O

orquidea

Hi All:

I have the statement below were "Tue" is in date format. That's is the
reason the macro doesn't read this field.
If ActiveCell.Offset(0, -10) Like "Tue*" And ActiveCell.Offset(0, -12) Like
"MB*" Then
How could I write this stamentent so that it works?

Thanks in advance for your help.

Orquidea
 
M

Mike H

Hi,

If it's a corrrectly formatted date then you can use weekday

If Weekday(ActiveCell.Offset(0, -10) = 3) And ActiveCell.Offset(0, -12) Like
"MB*" Then

Mike
 
O

orquidea

Mike:

I have the correct date format but when the if statement evaluates the
condition, it is considering all days as 3. Would be any extra format I have
to do.

Thanks,
Orquidea
 
Top