LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Need Help Pls..... Urgent!!

Hi Ryll

There are a few ways to do this. The method here assumes you have
headings in row 1 and that the Fruits (or whatever you are looking for)
are in column A.

Sub fin()
Dim fnd As String
Dim fndRng As Range
Dim eRow As Long
Dim lRow As Long
lRow = Sheets("Sheet1").Cells(Rows.Count, 1). _
End(xlUp).Row
fnd = InputBox("Enter a Fruit")
If fnd < "" Then
With Sheets("Sheet1").Cells(1)
.AutoFilter Field:=1, Criteria1:=fnd
Set fndRng = Rows("2:" & lRow). _
SpecialCells(xlCellTypeVisible)
.AutoFilter
End With
If Not fndRng Is Nothing Then
eRow = Sheets("Sheet2").Cells(Rows.Count, 1). _
End(xlUp).Row + 1
fndRng.Copy Sheets("Sheet2").Cells(eRow, 1)
End If
End If
End Sub

Regards
Rowan

ryll wrote:
hey thanks! your solution definitely helps. However as i've tried, it
could only select a row of eg. Orange. If I had plenty rows under the
fruit named Orange, how can i possibly do so?


 
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
IME MODE FOR EXCEL 2007 (URGENT URGENT) Stella Wong Excel Discussion (Misc queries) 1 August 23rd 08 11:16 PM
Please help very urgent Jeff Excel Discussion (Misc queries) 0 October 7th 05 04:35 PM
Urgent-Urgent VBA LOOP Jeff Excel Discussion (Misc queries) 0 October 6th 05 05:46 PM
Macro help urgent urgent Dave Peterson[_3_] Excel Programming 0 September 4th 03 03:59 PM
Macro help urgent urgent chandra Excel Programming 0 September 4th 03 03:50 PM


All times are GMT +1. The time now is 02:18 PM.

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"