I would appreciate some help, if someone has the time!- Moving rows to different worksheets.

tjduff

New Member
Joined
Apr 25, 2014
Messages
6
I would appreciate some help, if someone has the time!

I have an excel workbook that has three different tabs, tab1= repairs tab2=completed repairs tab3= follow up; all tabs have the same column headings A:K. In column "K", I have a data validation to determine the status on the repair, "C,F". All repairs initially start off in the Repairs Tab. At some point, they will be given validation in column "K". I have been trying to encode an action to send the entire row to the the corresponding Tab, C = "Completed repairs" tab and F= "follow up" Tab, once the Validation has been chosen. I appreciate all of your time and thoughts. I feel like the answer is right in front of me but for some reason i am not connecting the dots.

TJ
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I noticed them but I have not found one that has answered my question. I took a class about 4 years ago, and unfortunately, have not used it since.
as for what I have already:

Sub MoveDataToNewSheet()
Dim R As Range, c As Range, Lr As Long, sh1 As Worksheet, sh2 As Worksheet, vA As Variant
Set sh1 = Sheets("Repairs")
Set sh2 = Sheets("Completed Repairs")
Set R = sh1.Range("A3:K82").CurrentRegion
Lr = 1
For Each c In Intersect(R, sh1.Columns("K"))
If c.Value = 2 Then 'Change value to suit
vA = R.Rows(c.Row).Value
Range(sh2.Cells(Lr, "A"), sh2.Cells(Lr, UBound(vA, 2))).Value = vA
Lr = sh2.Cells(Rows.Count, "A").End(xlUp).Row + 1
End If
Next c
End Sub

but I am lost on the correct action to to use after declaring my variables. That code was from a previous post already in the forum, and I am currently attempting to make it work for me.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top