Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default Help with Macor

I would like to add a button to a worksheet that would allow input of an
value to be search fro in column C. If the value is found the entire
contents of the row would then be added to a new worksheet. I was trying to
write a macro to do this- but alas it appears to be beyond me, Any help
would be greatly appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default Help with Macor

Recorded and cleaned up macro to find smith and copy row to another sheet

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/2/2008 by Donald B. Guillett
'

'
Columns("J:J").Select
Selection.Find(What:="smith", After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Rows("5:5").Select
Selection.Copy
Sheets("Sheet2").Select
Sheets("Sheet2").Name = "Sheet2"
Rows("8:8").Select
ActiveSheet.Paste
End Sub

Sub findandcopyrow()
Columns("J").Find(What:="smith", After:=Cells(1, "J"), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).EntireRow.Copy _
Sheets("Sheet2").Rows("8:8")
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"gsxith3" wrote in message
...
I would like to add a button to a worksheet that would allow input of an
value to be search fro in column C. If the value is found the entire
contents of the row would then be added to a new worksheet. I was trying
to
write a macro to do this- but alas it appears to be beyond me, Any help
would be greatly appreciated!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macor JakeShipley2008 Excel Discussion (Misc queries) 3 June 21st 07 04:40 PM
master macor Neil Excel Discussion (Misc queries) 1 March 2nd 07 04:39 PM
How to create a macor to count the usage of another macor Jigu Excel Discussion (Misc queries) 0 March 11th 06 03:28 AM


All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"