Steven has attended:
Excel VBA Intro Intermediate course
Cell fomatting
Is there a VBA method to clean a large amount of data, leaving e.g. #NA/NA cells empty and keeping proper numbers in a desired format?
RE: cell fomatting
Hi Steven
Thanks for your question
The following code uses the IsError property of the range object to determine whether the cell contains an error. If it does, it changes the value to and empty string ""
If IsError(Range("A1").Value) = True Then
Range("a1").Value = ""
End If
This code checks cell "a1", but you could place this in a loop and have the range determined as a variable so that it would cycle through a range of cells
Regards
Stephen