John - only works if selection starts in row 1 I think, if I select rows 5 to 10 then your for loop becomes:
However, the rows.count part is the bit that was missing from my code:![]()
for 10 to 5 step -1 next
![]()
sub macro_1() dim count for count = selection.row to selection.row + selection.rows.count Range("D" & count) = mid(Range("C" & count),1,3) 'and so on next end sub
Bookmarks