Code to move rows into another sheet based on certain values
Solved/Closed
Ryleecone
Posts
7
Registration date
Monday August 12, 2019
Status
Member
Last seen
September 17, 2019
-
Aug 12, 2019 at 12:23 PM
vcoolio Posts 1404 Registration date Thursday July 24, 2014 Status Moderator Last seen September 15, 2023 - Aug 13, 2019 at 08:38 AM
vcoolio Posts 1404 Registration date Thursday July 24, 2014 Status Moderator Last seen September 15, 2023 - Aug 13, 2019 at 08:38 AM
Related:
- Google sheets move row to another sheet based on cell value
- Google meet download for pc - Download - Video calls
- Google sheet right to left - Guide
- Excel macro to create new sheet based on value in cells - Guide
- Move row to another sheet based on cell value ✓ - Excel Forum
- Little alchemy cheat sheet - Guide
2 responses
vcoolio
Posts
1404
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
September 15, 2023
259
Aug 13, 2019 at 02:23 AM
Aug 13, 2019 at 02:23 AM
Hello Ryleecone,
You could use a Worsheet_Change event code to do this:-
Once you enter 100% into any cell in Column G then click away (or press enter or down arrow), the relevant row of data will be transferred to the Completed sheet and the relevant row of data will be deleted from the Design sheet.
You need to ensure that 100% is the last entry that you make in any row (it would be a good idea to create a data validation drop down list for each cell in Column G just to prevent the possibility of errors).
To implement this code:-
- Right click on the Design sheet tab.
- Select "View Code" from the menu that appears.
- In the big white code field that then appears, paste the above code.
I hope that this helps.
Cheerio,
vcoolio.
You could use a Worsheet_Change event code to do this:-
Private Sub Worksheet_Change(ByVal Target As Range) Dim ws As Worksheet: Set ws = Sheets("Completed") If Intersect(Target, Columns(7)) Is Nothing Then Exit Sub If Target.Count > 1 Then Exit Sub If Target.Value = vbNullString Then Exit Sub Application.ScreenUpdating = False If Target.Value = [100%] Then Target.EntireRow.Copy ws.Range("A" & Rows.Count).End(3)(2) Target.EntireRow.Delete End If Application.ScreenUpdating = True End Sub
Once you enter 100% into any cell in Column G then click away (or press enter or down arrow), the relevant row of data will be transferred to the Completed sheet and the relevant row of data will be deleted from the Design sheet.
You need to ensure that 100% is the last entry that you make in any row (it would be a good idea to create a data validation drop down list for each cell in Column G just to prevent the possibility of errors).
To implement this code:-
- Right click on the Design sheet tab.
- Select "View Code" from the menu that appears.
- In the big white code field that then appears, paste the above code.
I hope that this helps.
Cheerio,
vcoolio.
Aug 13, 2019 at 08:28 AM
That worked.
Aug 13, 2019 at 08:38 AM
I'm glad to have been able to assist.
Cheerio,
vcoolio.