Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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??? |
#2
![]() |
|||
|
|||
![]()
Hi
what are you trying to achieve ? -- Regards Frank Kabel Frankfurt, Germany "One-Leg" schrieb im Newsbeitrag ... 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??? |
#3
![]() |
|||
|
|||
![]()
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 -- Don Guillett SalesAid Software "One-Leg" wrote in message ... 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??? |
#4
![]() |
|||
|
|||
![]()
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 "Frank Kabel" wrote: Hi what are you trying to achieve ? -- Regards Frank Kabel Frankfurt, Germany "One-Leg" schrieb im Newsbeitrag ... 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??? |
#5
![]() |
|||
|
|||
![]()
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!!! "Don Guillett" wrote: 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 -- Don Guillett SalesAid Software "One-Leg" wrote in message ... 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??? |
#6
![]() |
|||
|
|||
![]()
Hi
then use 'Edit - Replace' for this -- Regards Frank Kabel Frankfurt, Germany "One-Leg" schrieb im Newsbeitrag ... 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 "Frank Kabel" wrote: Hi what are you trying to achieve ? -- Regards Frank Kabel Frankfurt, Germany "One-Leg" schrieb im Newsbeitrag ... 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??? |
#7
![]() |
|||
|
|||
![]()
Hello,
Using Edit/Replace does the same thing... "Frank Kabel" wrote: Hi then use 'Edit - Replace' for this -- Regards Frank Kabel Frankfurt, Germany "One-Leg" schrieb im Newsbeitrag ... 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 "Frank Kabel" wrote: Hi what are you trying to achieve ? -- Regards Frank Kabel Frankfurt, Germany "One-Leg" schrieb im Newsbeitrag ... 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??? |
#9
![]() |
|||
|
|||
![]()
Hi
just check that you want to match the whole cell -- Regards Frank Kabel Frankfurt, Germany "One-Leg" schrieb im Newsbeitrag ... Hello, Using Edit/Replace does the same thing... "Frank Kabel" wrote: Hi then use 'Edit - Replace' for this -- Regards Frank Kabel Frankfurt, Germany "One-Leg" schrieb im Newsbeitrag ... 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 "Frank Kabel" wrote: Hi what are you trying to achieve ? -- Regards Frank Kabel Frankfurt, Germany "One-Leg" schrieb im Newsbeitrag ... 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??? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
border color in forms group box | Excel Discussion (Misc queries) | |||
Excel 2003 Forms Crash on Tablet PC all other OSs Ok | Excel Discussion (Misc queries) | |||
Print margins on forms | Excel Discussion (Misc queries) | |||
Group buttons from the forms toolbar | Excel Discussion (Misc queries) | |||
Pointer please | Excel Discussion (Misc queries) |