the macro given below compares the item nos from two sheets of the same workbook and puts the values in the column B of the second sheet.However,I need to delete the column A of the sheet which contains the item numbers and put these common items obtained into column A...How can i do that ?In other words,i want to override column A with these values..


Dim CompareRange As Variant, x As Variant, y As Variant

Set CompareRange = Workbooks("PlannedInventoryTransactions_lat").Worksheets("RawMatlIssued").Range("A2:A500")
'
' Loop through each cell in the selection and compare it to
' each cell in CompareRange.
Range("A2:A500").Select
For Each x In CompareRange
For Each y In Selection
If y = x Then y.Offset(0, 1) = y
Next y
Next x