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
 

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

Top