Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I have a range of dates in col A formated as 'ddd dd-mm-yyyy' the range is named 'DataSheetDate', I would like a Macro that will find a date = today's date and select the the cell offset(0,1). Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This will find the first date in the list and then stop looking:
Sub DateFind() Dim c As Range For Each c In Range("DataSheetDate") If c = Date Then c.Offset(, 1).Select Exit Sub End If Next End Sub Mike F "LaDdIe" wrote in message ... Hello I have a range of dates in col A formated as 'ddd dd-mm-yyyy' the range is named 'DataSheetDate', I would like a Macro that will find a date = today's date and select the the cell offset(0,1). Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perfecto:)
"Mike Fogleman" wrote: This will find the first date in the list and then stop looking: Sub DateFind() Dim c As Range For Each c In Range("DataSheetDate") If c = Date Then c.Offset(, 1).Select Exit Sub End If Next End Sub Mike F "LaDdIe" wrote in message ... Hello I have a range of dates in col A formated as 'ddd dd-mm-yyyy' the range is named 'DataSheetDate', I would like a Macro that will find a date = today's date and select the the cell offset(0,1). Thanks. . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Replace A1:A6 by your range =MIN(IF(ISNUMBER(MATCH(A1:A6,N(A1:A6=TODAY())*A1: A6,0)),A1:A6)) "LaDdIe" a écrit dans le message de groupe de discussion : ... Hello I have a range of dates in col A formated as 'ddd dd-mm-yyyy' the range is named 'DataSheetDate', I would like a Macro that will find a date = today's date and select the the cell offset(0,1). Thanks. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I forgot to say you need to validate the formula by Ctrl + Maj + Enter
Replace A1:A6 by your range =MIN(IF(ISNUMBER(MATCH(A1:A6,N(A1:A6=TODAY())*A1: A6,0)),A1:A6)) "LaDdIe" a écrit dans le message de groupe de discussion : ... Hello I have a range of dates in col A formated as 'ddd dd-mm-yyyy' the range is named 'DataSheetDate', I would like a Macro that will find a date = today's date and select the the cell offset(0,1). Thanks. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And in case one cell within your range is empty :
Validation : Maj + Ctrl + Enter =MIN(IF((ISNUMBER(MATCH(A1:A6,N(A1:A6=TODAY())*A1 :A6,0))*(LEN(A1:A6)0))0,A1:A6)) "michdenis" a écrit dans le message de groupe de discussion : ... I forgot to say you need to validate the formula by Ctrl + Maj + Enter Replace A1:A6 by your range =MIN(IF(ISNUMBER(MATCH(A1:A6,N(A1:A6=TODAY())*A1: A6,0)),A1:A6)) "LaDdIe" a écrit dans le message de groupe de discussion : ... Hello I have a range of dates in col A formated as 'ddd dd-mm-yyyy' the range is named 'DataSheetDate', I would like a Macro that will find a date = today's date and select the the cell offset(0,1). Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|