Link to home
Start Free TrialLog in
Avatar of Frank Freese
Frank FreeseFlag for United States of America

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
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

This is the result of entering 5 into the Inputbox.
28794899.xlsm
Avatar of Frank Freese

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
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Martin - I so tired I'll look at this tomorrow
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
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
Thank you for the update