Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code Help needed
Hello all I am trying to change the below macros so that the contents of cell A3 is used and not the text which happens to be “1090-0450*BE” (but could be any of a number of sequences). I recorded the first using the find function in excel and the second using the custom option in Autofilter Somebody please show me the way as its doin my head in . ' ' Macro4 Macro ' Macro recorded 11/5/2003 by ? ' Range("A3").Select Selection.Copy Cells.Find(What:="1090-0450*BE", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate End Sub Sub Macro5() ' ' Macro5 Macro ' Macro recorded 11/5/2003 by ? ' ' Range("A3").Select Selection.Copy Selection.AutoFilter Field:=1, Criteria1:="=1520-0444*BE", Operator:= _ xlAnd End Sub ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code Help needed
Try replacing it with: Range("A3").Value "liamothelegend" wrote in message ... Hello all I am trying to change the below macros so that the contents of cell A3 is used and not the text which happens to be "1090-0450*BE" (but could be any of a number of sequences). I recorded the first using the find function in excel and the second using the custom option in Autofilter Somebody please show me the way as its doin my head in . ' ' Macro4 Macro ' Macro recorded 11/5/2003 by ? ' Range("A3").Select Selection.Copy Cells.Find(What:="1090-0450*BE", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate End Sub Sub Macro5() ' ' Macro5 Macro ' Macro recorded 11/5/2003 by ? ' ' Range("A3").Select Selection.Copy Selection.AutoFilter Field:=1, Criteria1:="=1520-0444*BE", Operator:= _ xlAnd End Sub ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA code needed | New Users to Excel | |||
Code Needed | New Users to Excel | |||
VBA code help needed | Excel Discussion (Misc queries) | |||
Fw:code needed | Excel Programming | |||
code needed | Excel Programming |