Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default find row number

Hi Choice,

Try this macro if this works for you.

1. Select all data or range you are interested to find and run the macro
below.

Sub SelectStringCells()
Dim rCell As Range
Dim IString As String
Dim rSelected As Range

IString = "1/12/2001"

Set rSelected = Nothing
For Each rCell In Selection
If rCell.Value = IString Then
If rSelected Is Nothing Then
Set rSelected = rCell
Else
Set rSelected = Union(rSelected, rCell)
End If
End If
Next
If rSelected Is Nothing Then
MsgBox "No cells value match"
Else
rSelected.Select
MsgBox "Found the Dates"
End If
Set rCell = Nothing
Set rSelected = Nothing
End Sub

Hope this helps.

"choice" wrote:

in row A i have dates (multiple, but ascending)
i need to find the row that first contains a date and the last row that
contains that same date

thanks in advance

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
Find number of weekdays and wekend days given a total number of da Juan Correa Excel Discussion (Misc queries) 7 February 19th 10 09:47 PM
Find previous number and find next number in column DoubleZ Excel Discussion (Misc queries) 4 March 4th 09 08:51 PM
Need Cells.find to find first number in a row which is 8000 Kasper Excel Discussion (Misc queries) 9 December 15th 08 02:10 PM
countif formula to find the occurances of a number that is greater than one number but less than another steveo Excel Discussion (Misc queries) 3 July 8th 06 02:04 AM
find and delete text, find a 10-digit number and put it in a textbox Paul Excel Programming 3 November 16th 04 04:21 PM


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