Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
WEEKDAY() function: display TEXT not numeric weekday | Excel Discussion (Misc queries) | |||
Weekday | Excel Discussion (Misc queries) | |||
WEEKDAY question on year | Excel Discussion (Misc queries) | |||
Weekday | Excel Worksheet Functions | |||
WEEKDAY using IF | Excel Discussion (Misc queries) |