Thread
:
Pretty easy If loop - help!!
View Single Post
#
5
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
external usenet poster
Posts: 111
Pretty easy If loop - help!!
Good point. I ALWAYS assume US format (because that is what I am used to,)
and I frequently get burned because of it.
--
Kevin Vaughn
"Nick Hodge" wrote:
Having read Kevin's reply it could be the date you show is US mm/dd/yyyy. I
was presuming UK dd/mm/yyyy.
Take your pick depending on locale, but you should now get the drift
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS
"Nick Hodge" wrote in message
...
Use the VBA Day method
If Day(ActiveCell.value)=7 Then
TodayInt = 7
End If
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS
"nemadrias" wrote in message
oups.com...
How can I use an if loop to return the first number of a date.
For example, if cell A1 has the date: 7/06/2006, I want to say:
If (ActiveCell.Characters(Start:=1, Length:=1).Text = "7") Then
TodayInt = 7
End If
But this is trying to look for a string and its finding a date, so I
get an error...Anyone have a better idea??
Reply With Quote
Kevin Vaughn
View Public Profile
Find all posts by Kevin Vaughn