Translating Column Addresses into number/integer
Chrissy - many thanks - I'll give this a ago. It's far more elegent than my
rather ham solution.
Regards
Andrew
"Chrissy" wrote in message
...
There are many ways - this one is easy as you can use the
variables in lots of ways.
Sub MySub()
For xx = 4 To 9 'ROW
For yy = 6 To 16 'COL
If Range("A1").Offset(xx, yy) = Int(Range("A1").Offset(xx, yy)) Then
Range("AA1").Offset(xx, yy) = Range("A1").Offset(xx, yy)
End If
Next yy
Next xx
End Sub
This will check cells from F4:P9 to see if they are integers (they must be
numbers)
and save the integers into the same cells in the range AF:AP9.
Chrissy.
"Andreww" wrote in message
...
Hi - I have a for.. next loop that I want to shuttle across columns
based on
a supplied cell ref... how do I increment form column to collumn?
For instance I want to move, in a row, allong the columns and when I
find an
integer put it else where on the sheet
I thought it might look something like this:
for zz = 1 to 5 ' The rows
for xx = A to G 'The cols
do stuff
next xx
next zz
Any help MUCH appreciated!
Cheers
Andrew
|