Forum Discussion
Moving Rows Based on Information in a Cell
Here is a small Solution approach with VBA
Private Sub Worksheet_Change (ByVal Target As Range)
column = Target.Column
line = Target.Row
value = Target.Value
If column = 11 Then
Cells (line, value) .Value = Cells (line, 1)
End If
End Sub
Hope I was able to help you and would be happy to know if I could help you.
Nikolino
I know I don't know anything (Socrates)
* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.
- Brittany0724Nov 05, 2020Copper Contributor
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?
- NikolinoDENov 06, 2020Platinum Contributor
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.