Frank Freese
asked on
Delete selective rows and move specific cells
Folks,
In the attached file I have two columns labeled Product and Zip Code. I would like to be able to have a command button that deletes all blank rows when the value in a Zip Code cell is blank. The next think I need is to have an input box that allows me to select which zip code cells I want to move over one column. For example, in the input box I may want every 10th zip code moved for this file moved over 1 cell. For other files it may be every 5th. This will become a template and data will be copied and pasted into it.
Delet-and-Move.xlsx
In the attached file I have two columns labeled Product and Zip Code. I would like to be able to have a command button that deletes all blank rows when the value in a Zip Code cell is blank. The next think I need is to have an input box that allows me to select which zip code cells I want to move over one column. For example, in the input box I may want every 10th zip code moved for this file moved over 1 cell. For other files it may be every 5th. This will become a template and data will be copied and pasted into it.
Delet-and-Move.xlsx
ASKER
Martin,
OK...However, just got the actual file I'll be using and the user has a couple of changes (as well as a few problems I just found out)
1. He needs only column E, ZIP Code. Deleting the other columns is not a problem for me, except in column E there are some lookups. There I need to convert all cells form E2 to the end of column E formatted as number. The I can delete columns A:D.
2. I tried modifying your code and could not get the rows to delete. So I need help there.
3. I'll submit a different question where the user would have a Icon of the QuickTool bar so the code is executed once.
MoveandCopy.xlsm
OK...However, just got the actual file I'll be using and the user has a couple of changes (as well as a few problems I just found out)
1. He needs only column E, ZIP Code. Deleting the other columns is not a problem for me, except in column E there are some lookups. There I need to convert all cells form E2 to the end of column E formatted as number. The I can delete columns A:D.
2. I tried modifying your code and could not get the rows to delete. So I need help there.
3. I'll submit a different question where the user would have a Icon of the QuickTool bar so the code is executed once.
MoveandCopy.xlsm
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Martin - I so tired I'll look at this tomorrow
ASKER
Perfect! - now let me see what else my client wants. It is good to be back working.
As always, I appreciate you. Thanking you kindly
As always, I appreciate you. Thanking you kindly
You're welcome and I'm glad I was able to help.
In my profile you'll find links to some articles I've written that may interest you
including these two new ones.
Creating your own Excel Formulas and doing the impossible
A Guide to Writing Understandable and Maintainable VBA Code
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014
In my profile you'll find links to some articles I've written that may interest you
including these two new ones.
Creating your own Excel Formulas and doing the impossible
A Guide to Writing Understandable and Maintainable VBA Code
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014
ASKER
Thank you for the update
28794899.xlsm