Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Easy but I can't find it!
I worship at the fountain of your boolean minds:
I have two macro's for excel I want to pilfer, plunder and make extremely good use of: The first would dash through a sheet, looking for different names, recognize 'Jane', 'Jim', or 'Josh' and 'highlight' the entire 'row; in which their name appeared in col C: green, blue, or yellow. The second macro would look at Column A, if it contained a '0', copy it to 'Sheet 2' and then delete it from from sheet 1. I may not be describing what I'm looking for very well, and if you can point me to where they have been previously discussed, or create them he you deserve praise and eternal life. THANKS! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Easy but I can't find it!
Eternal life!!
for the 1st, look in vba help for FINDNEXT for the 2nd, you just sort or filterautofilterfor 0 and do your stuff. -- Don Guillett SalesAid Software wrote in message oups.com... I worship at the fountain of your boolean minds: I have two macro's for excel I want to pilfer, plunder and make extremely good use of: The first would dash through a sheet, looking for different names, recognize 'Jane', 'Jim', or 'Josh' and 'highlight' the entire 'row; in which their name appeared in col C: green, blue, or yellow. The second macro would look at Column A, if it contained a '0', copy it to 'Sheet 2' and then delete it from from sheet 1. I may not be describing what I'm looking for very well, and if you can point me to where they have been previously discussed, or create them he you deserve praise and eternal life. THANKS! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Easy but I can't find it!
I'm just trying to autamaton the process to save some time.
For the second I'm looking at this, which was written for a string search, and has an error message right now, so maybe someone can help me out a bit on what it's doing wrong: I suppose I need to convert it to a number search or something and add a Selection.delete... But I'm just guessing as this is the second macro I've ever tried! Still don't know about numero uno. Sub SearchForString() Dim LSearchRow As Integer Dim LCopyToRow As Integer On Error GoTo Err_Execute 'Start search in row 2 LSearchRow = 2 'Start copying data to row 2 in Done (row counter variable) LCopyToRow = 2 While Len(Range("A" & CStr(LSearchRow)).Value) 0 'If value in column A = "0", copy entire row to Sheet2 If Range("A" & CStr(LSearchRow)).Value = "0" Then 'Select row in Sheet1 to copy Rows(CStr(LSearchRow) & ":" & CStr(LSearchRow)).Select Selection.Copy 'Paste row into Sheet2 in next row Sheets("Sheet2").Select Rows(CStr(LCopyToRow) & ":" & CStr(LCopyToRow)).Select ActiveSheet.Insert 'Move counter to next row LCopyToRow = LCopyToRow + 1 'Go back to Sheet1 to continue searching Sheets("Sheet1").Select End If LSearchRow = LSearchRow + 1 Wend 'Position on cell A3 Application.CutCopyMode = False Range("A3").Select MsgBox "All matching data has been copied." Exit Sub Err_Execute: MsgBox "An error occurred." End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and Replace | Excel Worksheet Functions | |||
Code needed to find records from bottom up | Excel Discussion (Misc queries) | |||
Using the Find tool in EXCEL | Excel Worksheet Functions | |||
Find & Replace results to display specified chosen fields | Excel Discussion (Misc queries) | |||
VB Find and Replace | Excel Worksheet Functions |