View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jaysan3 jaysan3 is offline
external usenet poster
 
Posts: 14
Default search 2 criteria then update data

Hi,
I have created a form where we enter the search criterias and it will
update/paste some data into the row. However I have some slight problem when
it came to multiple criterias. This is what I have done so far with just one
criteria

PartSearch is one of the criteria while Admin & AdminRcvDate are the data to
be updated. I need to add in another criteria which is SerialNo.

With Worksheets(1).Range("U:U")
Set c = .Find(PartSearch, LookIn:=xlValues)
If c Is Nothing Then
MsgBox ("No data found!")
Else
firstAddress = c.Address
If c.Offset(0, 5).Value <= 1 / 1 / 2009 Then
c.Offset(0, 9).Value = Admin
c.Offset(0, 5).Value = AdminRcvDate
MsgBox ("Updated successful")
Else
MsgBox ("Item already received previously!")
End If
c.Offset(0, 9).Select
End If
End With