I am looking to see if any of the following code could be cleaned up? Any help would be greatful
![]()
Please Login or Register to view this content.
I am looking to see if any of the following code could be cleaned up? Any help would be greatful
![]()
Please Login or Register to view this content.
Perhaps post a sample Workbook and a detailed explanation of what you want to do..
There's many ways your code coudl be cleaned up..
Example:
![]()
Please Login or Register to view this content.
Could be :
But, regardless.. a Workbook attached an clear explanation will serve your needs better..![]()
Please Login or Register to view this content.
Another common example:
![]()
Please Login or Register to view this content.
can be written:
![]()
Please Login or Register to view this content.
That will remove the need to select cells, etc.
Given that a lot of the code is repetitive, you would do better to create a subroutine that executes the common code. Sometimes, only one parameter varies and, in that case, it could be passed to the subroutine.
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks