Mel_P
07-02-2007, 01:18 PM
Hello - I have a spreadsheet column (C) in which the first 6 characters are a code number and the rest is text. I want to extract them into a column (B) which I have created with VBA.
So what I want to do is
read cell C2 and extract 6 characters - Left (contents of C2,6)
put this in cell B2
move to row 3
read cell C3 and extract 6 characters - Left (contents of C3,6)
put this in cell B3
and so on until I reach the last row - I have found the number of rows used so my loop will be
For n = 2 to (Number of rows)
Code for above.
Next n
I can't get my head round excell syntax!
Can anybody advise please?
Thanks, Mel P
So what I want to do is
read cell C2 and extract 6 characters - Left (contents of C2,6)
put this in cell B2
move to row 3
read cell C3 and extract 6 characters - Left (contents of C3,6)
put this in cell B3
and so on until I reach the last row - I have found the number of rows used so my loop will be
For n = 2 to (Number of rows)
Code for above.
Next n
I can't get my head round excell syntax!
Can anybody advise please?
Thanks, Mel P