View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Macro Find value & insert

Hi,

Right click your sheet tab, view code and past this in and run it

Sub marine()
lastrow = Cells(Rows.Count, "C").End(xlUp).Row
Set myrange = Range("C1:C" & lastrow)
For Each c In myrange
If c.Value = Range("A1").Value Then
c.Offset(, 1).Value = Range("B2").Value
End If
Next


Mike


"wazzo" wrote:

Hi I need some code to look for names in column 3, which match name in
range a1, then if it does inserting value in column 4 from range b2.
Thats it !