End Sub[/CODE]Please Login or Register to view this content.
End Sub[/CODE]Please Login or Register to view this content.
Last edited by yanney; 12-26-2018 at 05:06 AM.
Unfortunately your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.
Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
As this is your first time I'll add them for you, but please note for the future.
Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.
Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.
One thought springs to mind and that's rather than loop through all your data along with a Union instruction to build a range of cells you want to transfer, just use an autofilter to identify the data in question then use the SpecialCells(xlCellTypeVisible) syntax to copy the whole lot with one instruction. It will be much faster than a loop,
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
The above syntax is incorrect. Below defines cell A3 to the last used cell in column A...Please Login or Register to view this content.
Please Login or Register to view this content.
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
I am sincerely grateful for your response . Thank you for the corrections concerning the rules and the syntax.
I have made the necessary corrections as you directed.
Again,I tried running the codes but is still not working..its gave me "subscript out of range with run-time error 9.
Any further help will be appreciated .Thank you
In your original post above, only put CODE tags around your actual code. Not around your comments. It should be formatted like this post. It makes it much easier to read.
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks