i'm writeing Excel 2003 & Crystal Reports 9 application. i have 2 sheets: in firs i have name, adres, city etc and i must copy only that cells with are not empty. how to make it automaticly by loop in VBA?
please help
i'm writeing Excel 2003 & Crystal Reports 9 application. i have 2 sheets: in firs i have name, adres, city etc and i must copy only that cells with are not empty. how to make it automaticly by loop in VBA?
please help
Rather than looping, it is probably best to filter out non-blanks, then use the SpecialCells(xlCellTypeVisible) property to copy only visible cells as a block. You won't need a loop for this and it more efficient than iterating through each cell.
Post a sample workbook (non-sensitive, dummy-data) for more help and provide a clear explanation of the expected results.
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
i upload 2 sheets in first is before "sorting & copying" an in second is after that - i want to have make it automaticly - any sugestions ?
---
thanks ;-)
you could make use of autofilter heres a slightly tidied up recorded macro
Please Login or Register to view this content.
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Per my previous suggestion and refining Leith's code . . .
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks