Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Help with Code
A little help, please. I keep getting a "Type Mismatch" error. Column I is
formatted as Date. Private Sub Workbook_Open() Dim cell As Range Application.Worksheets(5).Activate Set rngLate = Range("I2:I65535") For Each cell In rngLate If cell.Value < "" And (cell.Value - Date) <= 2 And cell.Offset(, -1).Value = "" Then MsgBox "Order Due" & " " & cell.Offset(, -7).Value & Chr(10) & cell.Value End If Next cell Application.Worksheets(4).Activate End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Help with Code
Make sure that all cell.Value are numeric
-- Gary's Student "aftamath" wrote: A little help, please. I keep getting a "Type Mismatch" error. Column I is formatted as Date. Private Sub Workbook_Open() Dim cell As Range Application.Worksheets(5).Activate Set rngLate = Range("I2:I65535") For Each cell In rngLate If cell.Value < "" And (cell.Value - Date) <= 2 And cell.Offset(, -1).Value = "" Then MsgBox "Order Due" & " " & cell.Offset(, -7).Value & Chr(10) & cell.Value End If Next cell Application.Worksheets(4).Activate End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change case...help please | Excel Worksheet Functions | |||
Macro for changing text to Proper Case | Excel Worksheet Functions | |||
Using other workbooks.. | Excel Worksheet Functions | |||
Make Change Case in Excel a format rather than formula | Excel Worksheet Functions | |||
Opening a file with code without a set file name | Excel Discussion (Misc queries) |