LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find and select


Kash;477897 Wrote:
Hi, I need to find value which is in sheet1.range("B2") in range
sheets("Sep").range("C2:AG2"). Please help


Hello Kash,

Here is sample macro to give you an idea.

================================
Sub FindData()

Dim Data As Variant
Dim FoundIt As Range
Dim Rng As Range

Data = Sheet1.Range("B2")
Set Rng = Sheets("Sep").Range("C2:AG2")

Set FoundIt = Rng.Find(Data, , xlValues, xlWhole, xlByColumns,
xlNext, False)
If FoundIt Is Nothing Then
MsgBox Data & " not found."
Exit Sub
End If

'Insert Code to handle found data here

End Sub
================================


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=131832

 
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
Find & Select Celeste[_2_] Excel Discussion (Misc queries) 3 December 1st 09 05:52 PM
Find and select all rbmcclen[_2_] Excel Programming 2 July 14th 06 09:05 PM
Find and Select Judd Jones[_2_] Excel Programming 2 December 29th 04 06:09 PM
Find All.... Then Select All Jason Excel Programming 2 November 7th 04 07:52 PM
Find then select to the right JUAN Excel Programming 2 April 30th 04 09:49 PM


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