Macro to replace data

gmazza76

Well-known Member
Joined
Mar 19, 2011
Messages
771
Office Version
  1. 365
Platform
  1. Windows
Good Afternoon,

I am using the VB below to try and find a reference in column 5 ( E ) and then copy the info as per below to the same row that it finds the reference on. I have come a bit unstuck as the VB is currently just copying a new line in instead of copying over it.

Would it be best way to do this way?

Code:
If mgrname = ("Manager 1") Then
Set MyFind = Sheets("Manager 1").Columns(5).Find(what:=CProNumber, searchdirection:=xlNext, lookat:=xlWhole)
    If Not MyFind Is Nothing Then
    extractRow = MyFind.Row
Else
    MsgBox "Cannot find value" & CProNumber
    Exit Sub
End If
Sheets("Manager 1").Cells(extractCell, 4) = Score
Sheets("Manager 1").Cells(extractCell, 9) = Q1
Sheets("Manager 1").Cells(extractCell, 10) = Q2
Sheets("Manager 1").Cells(extractCell, 11) = Q3

Many Thanks
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,224,521
Messages
6,179,275
Members
452,902
Latest member
Knuddeluff

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