Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() So i've filled a column with "=G2*VLOOKUP(D2,Units,2,FALSE)" Sometimes that's going to fail and the value of the cell will be #VALUE!. So then i've got a loop to go through and clear any 0s. However, the problem occurs when it hits one of the cells that didn't calcuate right. I want to clear that cell's value, but i wasn't sure how to catch it. Do While Not IsEmpty(ActiveCell.Offset(0)) If ActiveCell.Value = 0 Then ActiveCell.Value = "" Else: ActiveCell.Value = 1 End If ActiveCell.Offset(1).Select Loop Thanks, Chris -- cbh35711 ------------------------------------------------------------------------ cbh35711's Profile: http://www.excelforum.com/member.php...o&userid=30276 View this thread: http://www.excelforum.com/showthread...hreadid=529383 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
catching cancel on QueryTable.Refresh | Excel Programming | |||
globally catching any error event? | Excel Programming | |||
Catching VbMsgBoxResult | Excel Programming | |||
Catching NewSheet-Event in another WorkBook | Excel Programming | |||
Catching an error | Excel Programming |