From sheet 1 copy selected row then search sheet 2

CATIA_V5

New Member
Joined
May 31, 2019
Messages
2
From sheet 1 copy selected row then search sheet 2 For same, And if the first range matched then update Sheet 2. if no match then paste on next empty row

sht1
row A16 THRU K16

SHT2
Find Match from sheet 1 in sheet 2
If A16 thru K16 match update these only, Leave L16 Alone,
If no Match copy in next empty Row

i have this now..
'THIS INPUTS TOOLS
Sub Move_INPUT_INVENTORY()
Application.ScreenUpdating = False
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Dim UserRange As Range

Set copySheet = Worksheets("INPUT")
Set pasteSheet = Worksheets("INVENTORY")


On Error GoTo Canceled
Set UserRange = Application.InputBox _
(Prompt:="Range to cut:", _
Title:="Range cut", _
Default:=Selection.Address, _
Type:=8)
UserRange.Copy
UserRange.Select
Canceled:
pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Selection.EntireRow.Delete
Application.CutCopyMode = False
Application.ScreenUpdating = True




End Sub
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
See if you can use this

Code:
Sub t()
Dim sh1 As Worksheet, sh2 As Worksheet, fn As Range, rng As Range
Set sh1 = Sheets("INPUT")
Set sh2 = Sheets("INVENTORY")
With sh1
.Activate
Set rng = Application.InputBox("Select Range To Cut.", "RANGE TO CUT", Type:=8)
End With
Set fn = sh2.Range("A:A").Find(rng.Cells(1).Value, , xlValues, xlWhole)
    If Not fn Is Nothing Then
        rng.Cells(1).Resize(, 11).Cut fn
    Else
        rng.Cut sh2.Cells(Rows.Count, 1).End(xlUp)(2)
    End If
End Sub
 
Upvote 0
Hello
and Good Morning,
Just got to work and tried your Script,
And it works GREAT!!!
Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,424
Members
448,961
Latest member
nzskater

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