Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type mismatch
This is an extract from my macro:
For m = 2 To 20 .Cells(k + 2, m).Value = .Cells(k, m) - .Cells(k + 1, m) I get a type mismatch, I think that a lot of cells in the worksheet I'm evaluating are words. How do I rectify this? Help is greatly appreciated |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type mismatch
Maybe something like
For m = 2 To 20 .Cells(k + 2,m).Value = IIf(IsNumeric(.Cells(k, m) Value), Cells(k, m) .Value, 0) - _ IIf(IsNumeric(.Cells(k + 1, m).Value), .Cells(k + 1, m).Value, 0) -- HTH RP (remove nothere from the email address if mailing direct) "teresa" wrote in message ... This is an extract from my macro: For m = 2 To 20 .Cells(k + 2, m).Value = .Cells(k, m) - .Cells(k + 1, m) I get a type mismatch, I think that a lot of cells in the worksheet I'm evaluating are words. How do I rectify this? Help is greatly appreciated |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Type Mismatch | Excel Worksheet Functions | |||
Type Mismatch | Excel Programming | |||
Type mismatch | Excel Programming | |||
Type Mismatch | Excel Programming | |||
Type mismatch | Excel Programming |