LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default sick code needs doctor

here is the code



Sub dater3()
Dim lr As Single
Dim r As Variant
Dim Sr As Long
r = Range("a1").Value

r = Day(r)
MsgBox (r)

Windows("Navy Cash stats April.xls").Activate
Sheets(r).Select

With ActiveSheet

lr = Cells(Rows.Count, 1).End(xlUp).Row

Range("a1", Cells(lr, 1)).Select
For Each cell In Selection
If cell.Value = "7:00" Then
cell.Select
Sr = cell.Row

End If
Next
End With

MsgBox (Sr)

End Sub

the thing is that the last message box comes back zero
there is a cell in that range that says "7:00" its number is 16.
think that the format of X:XX is messin it all up. I can't figure
way around this.


Help Pleas

--
Message posted from http://www.ExcelForum.com

 
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
Excel Doctor Kassie Links and Linking in Excel 2 August 15th 05 08:25 PM
Excel Doctor Kassie Excel Worksheet Functions 2 August 15th 05 08:25 PM
Excel Doctor GLS Excel Worksheet Functions 2 July 22nd 05 05:09 PM
Excel Doctor GLS Links and Linking in Excel 0 July 22nd 05 08:14 AM
Excel Logic needs a Doctor !! FORMULA FIX DESIRED!! Learning VBA[_3_] Excel Programming 7 November 27th 03 11:10 PM


All times are GMT +1. The time now is 11:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"