Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My below code is not giving the result to i excpect, can i know where is the
mistake. I have four columns. I have created two variables for the fourth column one is a3 and CurMth, in select case MyDate if a3 isequal to MyDate then the result in fifth column need to Yes Sub Results() Dim CurMth As String Dim PrvMth As String RowCount = 1 Do While Range("A" & RowCount) < "" Aging = Range("A" & RowCount) Frequency = Range("B" & RowCount) Age = Range("C" & RowCount) MyDate = Range("D" & RowCount) a = ActiveCell.Offset(0, 0).Range("D" & RowCount) a1 = Right(a, 2) a2 = Left(a, 2) a3 = a2 & a1 MsgBox a3 CurMth = Format(Date, "mmyy") PrvMth = Format(DateSerial(Year(Date), Month(Date) - 1, 1), "mmyy") MsgBox CurMth & vbLf & PrvMth Select Case Age Case Is < 60: Select Case Frequency Case "Monthly": Select Case MyDate Case CurMth = a3: Results = "Yes" End Select End Select End Select Range("E" & RowCount) = Results RowCount = RowCount + 1 Loop End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
End Select without Select Case, Block If without End If errors | Excel Programming | |||
SELECT CASE - Which Row am I on? | Excel Programming | |||
Select Case | Excel Programming |