LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Weekday question

Hi there

It seems Im having a problem with weekday function.
I have a column of data values, some of those values are DATE function given
and then there are some others in text format (even some blanks).

Trough a macro i can identify which weekday is it, so to do an action
depending on it. Everything seems to work fine until I reach a cell with no
data (blank), then the action stops and i get a "Type mismatch Error"

How can i avoid this?, im includig the program searching for any kindda help

Thanx

Range("d12").Activate
i = 12
Do While i < 65

If Weekday(Cells(i, 2).Value) = vbMonday Or Weekday(Cells(i, 2).Value) =
vbTuesday Or Weekday(Cells(i, 2).Value) = vbWednesday Or Weekday(Cells(i,
2).Value) = vbThursday Or Weekday(Cells(i, 2).Value) = vbFriday Then

ActiveCell.Value = cxdce
i = i + 1
ActiveCell.Offset(1, 0).Activate

Else

i = i + 1
ActiveCell.Offset(1, 0).Activate
End If
Loop


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
WEEKDAY() function: display TEXT not numeric weekday tom Excel Discussion (Misc queries) 3 November 21st 06 04:32 PM
Weekday Darts via OfficeKB.com Excel Discussion (Misc queries) 3 May 26th 06 06:26 PM
WEEKDAY question on year mrjeep Excel Discussion (Misc queries) 2 May 3rd 06 09:02 AM
Weekday Thomas Excel Worksheet Functions 6 January 29th 06 01:07 AM
WEEKDAY using IF lunker55 Excel Discussion (Misc queries) 2 December 4th 04 03:34 PM


All times are GMT +1. The time now is 03:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"