|
-
Jul 17th, 2000, 03:12 AM
#1
Thread Starter
Addicted Member
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?????
-
Jul 17th, 2000, 03:57 AM
#2
Lively Member
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
-
Jul 17th, 2000, 04:45 AM
#3
Fanatic Member
Or you could just cheat and use:
Code:
Cells.Replace What:="0", Replacement:="a", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False
Which would be cheating, but would work very quickly...
-
Jul 17th, 2000, 11:04 AM
#4
Thread Starter
Addicted Member
i can't get the first example to work -- are x and y variables that i need to give a value to???? help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|