Forum Discussion
Moving Rows Based on Information in a Cell
NikolinoDE I think something like this is what I am looking for but maybe if I upload a sample file it will help some to narrow down what it would look like for me. I want to be able to run a macro that will split the list into two lists depending upon values in column B.
I have attached a sample spreadsheet to help explain what I'm referring to. In the sample, values "****00022", "****00031", and "****00141" in column B would correspond with one list and values "****00131", "****00231", and "****00201" in column B would correspond with a second list. What is the best way to approach splitting the big list into two lists using VBA?
Please explain to me what exactly you would like, which data or content should be moved from which cell to which?
Enclosed some information.
How to select cells/ranges by using Visual Basic procedures in Excel
Excuse me for the inconvenience, but need precise information in order to be able to provide you with an acceptable solution.
Thank you for your understanding and patience
Nikolino
I know I don't know anything (Socrates)
- Brittany0724Nov 06, 2020Copper Contributor
NikolinoDE No inconvenience at all. I appreciate your help.
I would like it to split the list into two depending on what information is in the "Card number" Column (B). I need the other two columns for that row to move with it as well.
To explain in more detail, if the "card number" (column B) is ****00022, ****00131, and ****00231 those cells and the cells in the same rows as those (the cells in column A & C) all need moved into a new sheet. The remaining "card numbers" and corresponding cells in the same rows can stay on the first sheet.
Hopefully this makes more sense. If I need to clarify more, please let me know.
- NikolinoDENov 06, 2020Platinum Contributor
Sry but now I'm totally confused. Could you upload a file (like the one before) where you could show me how to get the data and how it should be ... with a little example.
Thank you for your understanding and patience
Nikolino
I know I don't know anything (Socrates)
- Brittany0724Nov 09, 2020Copper Contributor
I have attached a file to help better explain. The first sheet is the original list. I have highlighted the cells that will be used to determine which entries will go to which list. The other two sheet are what I need to end up with. Row one will always be the same on the original list and the final lists but the other rows will change depending how what values are in Column B. For example when looking at the first sheet, one week there may be more rows with "****00022" and other weeks there may be more rows with "****00231". This is why I need to do it based on the value in column B. Please let me know if there is something that I need to explain better.
Thank you for your help.