Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP WITH AN EXCEL PROBLEM
I have a data sheet containing 10k rows of survey data. I would like to
know if anyone could help me with a macro that would 1.prompt me for a search term ie. "earthlink" 2.go through all 10000 rows of data in column C and copy the cells that contain the search term 3.paste the cells in the same row # only in column E. Is this possible to do? It would save me sooooo much time. I would be very grateful if anyone would help me with this. Thanks in advance Joe |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP WITH AN EXCEL PROBLEM
Sub CopyData()
Dim ans As String, rng1 As Range, rng As Range Dim sAddr As String ans = InputBox("Enter Search Term:") If ans = "" Then Exit Sub With ActiveSheet Set rng = .Range(.Range("C2"), .Cells(Rows.Count, "C").End(xlUp)) Set rng1 = rng.Find(What:=ans, _ After:=rng(rng.Count), _ LookIn:=xlValues, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rng1 Is Nothing Then sAddr = rng1.Address Do .Cells(rng1.Row, "E").Value = .Cells(rng1.Row, "C").Value Set rng1 = rng.FindNext(rng1) Loop While rng1.Address < sAddr Else MsgBox ans & " was not found" End If End With End Sub -- Regards, Tom Ogilvy wrote in message oups.com... I have a data sheet containing 10k rows of survey data. I would like to know if anyone could help me with a macro that would 1.prompt me for a search term ie. "earthlink" 2.go through all 10000 rows of data in column C and copy the cells that contain the search term 3.paste the cells in the same row # only in column E. Is this possible to do? It would save me sooooo much time. I would be very grateful if anyone would help me with this. Thanks in advance Joe |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Colon at the end of excel file name(ex: problem.xls:1, problem.xls | New Users to Excel | |||
Problem viewing Excel 2003 Pivot Chart fields in Excel 2007 | Charts and Charting in Excel | |||
Weird problem with Excel 2000...Worksheets disappearing in a shared Excel file | Excel Discussion (Misc queries) | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
EXCEL FORMAT PROBLEM WHEN SENDING EXCEL SHEET AS MESSAGE BODY IN . | Excel Discussion (Misc queries) |