I have in sheet1:
Item QTY
A 1
B 10
C 0
In sheet2 I have
Item QTY
B
I have in sheet1:
Item QTY
A 1
B 10
C 0
In sheet2 I have
Item QTY
B
Re: Find And Replace Old Data With New Data
Quote from ReafidyThats lovely, how about a question?
What I want to do is to replace the old data in sheet 1 with the data from sheet2
Here is a code which almost does what I want but somehow need to replace data in sheet1 column b with data from sheet2.
Sub ABC()
Dim rng1 As Range, rng2 As Range
Dim cell As Range
'
'Data to be have replacements
' applied
'
With Worksheets("Name1")
Set rng1 = .Range(.Cells(1, 1), _
.Cells(Rows.Count, 1).End(xlUp))
End With
' List of values in sheet Name1
' that need to be replaced and
' the corresponding replacement value
With Worksheets("Name2")
Set rng2 = .Range(.Cells(1, 1), _
.Cells(Rows.Count, 1).End(xlUp))
End With
' Now do the replacements
For Each cell In rng2
rng1.Replace _
What:=cell, _
Replacement:=cell.Offset(0, 1), _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
Next cell
End Sub
Display More
Re: Find And Replace Old Data With New Data
Either you are leaving out information that is vital to your question, or you are making this far too complicated. Why not just copy Sheet2 and paste over Sheet1?
Re: Find And Replace Old Data With New Data
Sheet1 is the master inventory and I am using sheet2 for new activity.
Sheet2 may only have 20 items in it and not in the same order as sheet1.
what I hope to do is use a hand barcode scanner for the item number. These are on businss cards produced from Excel.
Since most quanities withdrawals are less than ten, I would have a single sheet for the most popular WD quanities to point the hand scanner to.
Re: Find & Replace Data Between 2 Sheets
I stand and applaud your expertise. That was what I need.
Thanks,
Don’t have an account yet? Register yourself now and be a part of our community!