could someone help me out with the syntax on a loop that would change this
0
0
0
0
into "a" as many times as it might appear it has no set row count each time?????
Printable View
could someone help me out with the syntax on a loop that would change this
0
0
0
0
into "a" as many times as it might appear it has no set row count each time?????
Wow. That was hard to understand. Start using punctuations and commas to make yourself better understood.
I understand this as a search and replace routine for all cells containing "0". You want to replace the "0"s with "a"s, right?
Do something like this
Code:For y = 1 To NoOfRows
For x = 1 To NoOfColumns
If ActiveSheet.Cells(x,y)=0 Then ActiveSheet.Cells(x,y)="a"
Next x
Next y
Or you could just cheat and use:
Which would be cheating, but would work very quickly...Code:Cells.Replace What:="0", Replacement:="a", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False
i can't get the first example to work -- are x and y variables that i need to give a value to???? help