replacing a range of numbers

S

sg

in a group of cells i would like to replace all example i want to replace all
numbers >10. Everything tells me it cannot identify mty number
 
B

Bob Bridges

Seems to me we're missing some information here. Would this be what you
mean?: "I would like to identify a selected group of cells (eg C5:F10) and
place the character string 'XXX' in any cell of that group whose current
value is > 10. If the original looks like this:

C D E F
5 12 9 5 13
6 1 2 3 5
7 5 7 10 14
8 14 12 10 8
9 4 9 16 25
10 1 8 27 64

....afterward it should look like this:

C D E F
5 XXX 9 5 XXX
6 1 2 3 5
7 5 7 10 XXX
8 XXX XXX 10 8
9 4 9 XXX XXX
10 1 8 XXX XXX

Is this possible? When I try, Excel tells me it can't identify my number."

Try to ask your question (whatever it really is, because I doubt it's the
above) more exactly, in this mode.
 
D

Don Guillett

One way
Sub replacemorethan()
mc = "m"
For i = 1 To Cells(rows.Count, mc).End(xlUp).Row
If Cells(i, mc) > 10 Then Cells(i, mc) = 1000' or whatever
Next i
End Sub
 

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

Top