Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
macro custom error check
For each matching value I find in column A, I need to check to see whether a
condition is true in another cell in different column but in the same row. I need to limit the search by the size of the data as opposed to blanks because there are blanks, so the beginning is necessary. Range("D10").Select x = ActiveCell.Row y = ActiveCell.Column w = 0 Do While Cells(x, y).Value < "" x = x + 1 w = w + 1 Loop Range("A10").Select x = ActiveCell.Row Do Until x = w + 10 Cells(x, 1).Select A = Cells(x, 1).Value Cells(x, 3).Select C = Cells(x, 3).Value If (A = "purchased") And (C = 0) Then Cells(x, 3).Select MsgBox "The selected cell SHOULD have a posting reference number." Exit Sub Else x = x + 1 End If Loop |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error Msg 400 - Macro Spell Check | Excel Discussion (Misc queries) | |||
Sum up columns in different sheet with error check | Excel Discussion (Misc queries) | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
How do I correct a cyclic redundancy check error | Excel Discussion (Misc queries) | |||
data error - cyclic redundancy check | Excel Discussion (Misc queries) |