Matching data copy and paste

Kell2Jam

New Member
Joined
May 10, 2020
Messages
33
Office Version
  1. 2013
Platform
  1. Windows
I am trying to do what i did last time with this inquiry but it needs to be copied into a single cell rather than a range.

This is the current code that i have:

Dim myCell As Range, endCell As Long, destCell As Range
Application.ScreenUpdating = False

With Sheets("Last report")
For Each myCell In .Range("A2:A" & .Range("A" & Rows.Count).End(xlUp).Row)
If myCell.Value <> myCell.Offset(-1).Value Then
endCell = .Columns("A").Find(myCell.Value, , xlValues, , xlByRows, xlPrevious).Row
Set destCell = Sheets("Open PO's Report").Columns("A").Find(myCell.Value, , xlValues, , xlByRows, xlNext)
If Not destCell Is Nothing Then Range(.Cells(myCell.Row, "A"), .Cells(endCell, "J")).Copy destCell
End If
Next
End With

Application.ScreenUpdating = True

As i am new to Macros and VBA i am not understanding exactly what does what with this code but i know that it will go through a cell column range 1 by 1 and find the match of Cells in A column and paste the entire cell row into the matching row, what i need is similar but instead of copying and pasting the entire cell row, i just need it to copy a single cell value an paste into the matching row cell "I".

Can someone explain how this is done?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,215,248
Messages
6,123,866
Members
449,129
Latest member
krishnamadison

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