The macro that i've written is to concatenate cells with data in, the number
of rows can vary depending on the sort of data I'm working with. The macro
works, it concatenates the cells that i've asked it to, however, it
concatenates the empty cells below the data also, resulting in problems when
i try and sort the data after i have run the macro - it brings empty cells up
to the top. Would be very appreciative if anyone knows what value I can
write in the script so that the macro works on data that is there, no matter
how many rows down it is.
Hello
You may use some code like this:
For i = 1 to Worksheets(quot;Sheet1quot;).range(quot;a65536quot;).end(xlup).row
'your stuff here
Next i
HTH
Cordially
Pascal
quot;welshmagquot; gt; a écrit dans le message de
news: ...
gt; The macro that i've written is to concatenate cells with data in, the
gt; number
gt; of rows can vary depending on the sort of data I'm working with. The
gt; macro
gt; works, it concatenates the cells that i've asked it to, however, it
gt; concatenates the empty cells below the data also, resulting in problems
gt; when
gt; i try and sort the data after i have run the macro - it brings empty cells
gt; up
gt; to the top. Would be very appreciative if anyone knows what value I can
gt; write in the script so that the macro works on data that is there, no
gt; matter
gt; how many rows down it is.
- Sep 23 Tue 2008 20:46
how do i get my macro to only work on data thats there?
close
全站熱搜
留言列表
發表留言