Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default excel search a sheet for a value

Use the following code and see if it helps...

Sub Button1_Click()

Dim fnd As String



fnd = InputBox("What do u want to Find?")
Range("A1").Select
Cells.Find(What:=fnd, After:=ActiveCell, LookIn:=xlFormulas, LookAt
_
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False).Activate

ActiveCell.Offset(1, 0).Activate
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Select
Selection.Copy





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
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
Search for a data in excel sheet Sudha Excel Discussion (Misc queries) 1 February 2nd 09 05:51 PM
Search for rows in one sheet and copy into another sheet based on customer id [email protected] Excel Worksheet Functions 1 October 22nd 07 03:09 AM
Is it possible to combine MATCH & IF to search an excel sheet Callan Excel Worksheet Functions 1 October 28th 05 01:45 PM
how do i search an excel sheet for links to another spreadhseet? Flutie99 Excel Discussion (Misc queries) 1 June 16th 05 09:39 PM
Search For Data In An Excel Sheet Thru Code Rajesh Sharma Excel Programming 0 July 17th 03 11:50 AM


All times are GMT +1. The time now is 11:45 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"