Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find & Select | Excel Discussion (Misc queries) | |||
Find and select all | Excel Programming | |||
Find and Select | Excel Programming | |||
Find All.... Then Select All | Excel Programming | |||
Find then select to the right | Excel Programming |