PC Review


Reply
Thread Tools Rate Thread

Catching errors

 
 
cbh35711
Guest
Posts: n/a
 
      3rd Apr 2006

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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
catching all errors =?Utf-8?B?cm9kY2hhcg==?= Microsoft ASP .NET 6 20th Nov 2006 01:19 PM
How to catching DLL run-time errors in VB.net? R. MacDonald Microsoft VB .NET 0 12th Jan 2006 01:20 PM
Catching run time errors Manish Soni Microsoft C# .NET 3 31st May 2005 05:36 PM
Catching Framework Errors TonyG Microsoft ASP .NET 1 26th Aug 2003 07:52 PM
Catching ASP.NET errors Mikael Engdahl Microsoft ASP .NET 3 15th Aug 2003 07:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:03 PM.