VBA forms - HELP!!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I'm using the following in a macro but it doesn't work:

Range("A2:A65536").Select
If Cells.Select = "0" Then Selection.ClearContents

What should I change???
 
I just recorded the macro6 below but it could be simply

Columns(1).Replace "0", ""

Sub Macro6()
'
' Macro6 Macro
' Macro recorded 12/15/2004 by Don Guillett
'

'
Columns("A:A").Select
Selection.Replace What:="0", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
 
Hello,

I have many cells with numbers in them and many come up with only a "0" in
them. I want to use a macro that will see the value of the cell and if it is
"0", then I would like to clear the cell. If it's anything else than "0",
nothing should be done!!!

Thanks
 
Hello,

I did that allready but the other cells in colum A that have numbers
(105482102542) in them, the "0" are removed and that is not a good thing...
:-(

Thanks!!!
 
then use
Columns(1).Replace "0", "", LookAt:=xlWhole
or, more simply
Columns(1).Replace "0", "", xlWhole
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

If cell = "0", then clear the cell 3
Adjusting Macro 2
clear cells when workbook is opened 12
Yet another copy/paste macro question 6
IF STATMENT OR CASE STATEMENT 1
2 macro help 7
auto numbering problem 2
vba help 2

Back
Top