View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
alexm999[_58_] alexm999[_58_] is offline
external usenet poster
 
Posts: 1
Default Need Quick Fix... Find macro Issue

Does help. Now one more problem. And I posted it before with no help...
I have 2 data criteria that Im searching for; DDC and DDCE.
If I have no DDC in theory, the program should then skip to DDCE an
use that data to populate the fields. but whats happening is if DDC i
not there, DDCE data goes into DDC cells.

Is there a way to isolate or stop this from happening?

BTW, the other file that i get the DDC and DDCE data cannot b
altered.
Here's my new revised code:

Windows("10.txt").Activate
Set ofound = Cells.Find(WHAT:="DDC", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=True)
If Not ofound Is Nothing Then
ofound.Activate
ActiveCell.Offset(rowOffset:=0, columnOffset:=5).Activate
Selection.Copy
Windows("DAILY OPERATIONS_2004.xls").Activate
Range("C18").Select
ActiveSheet.Paste
End If
Windows("10.txt").Activate
Set ofound = Cells.Find(WHAT:="DDCE", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not ofound Is Nothing Then
ofound.Activate
ActiveCell.Offset(rowOffset:=0, columnOffset:=6).Activate
Selection.Copy
Windows("DAILY OPERATIONS_2004.xls").Activate
Range("E18").Select
ActiveSheet.Paste
End I

--
Message posted from http://www.ExcelForum.com