Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Name a Range based on Dates
Hello All,
I have dates starting from 01-03-2006 and till today The dates keeps on adding but the same date is not repeated. Or say even f it is repeated it is sorted according to date. No how i can dynamically name the range based on month? for eg 01-03-2006 to 31-03-2006 named as RngMarch and 01-04-06 to 30-04-06 as RngApr and so on.. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Name a Range based on Dates
Dim iStart As Long
Dim iend As Long Dim rng As Range iStart = ActiveSheet.Evaluate("=MIN(IF(MONTH(A1:A1000)=3,RO W(A1:A1000)))") iend = ActiveSheet.Evaluate("=MAX(IF(MONTH(A1:A1000)=3,RO W(A1:A1000)))") Set rng = Range("A" & iStart & ":A" & iend) rng.Name = "rngMarch" -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Soniya" wrote in message oups.com... Hello All, I have dates starting from 01-03-2006 and till today The dates keeps on adding but the same date is not repeated. Or say even f it is repeated it is sorted according to date. No how i can dynamically name the range based on month? for eg 01-03-2006 to 31-03-2006 named as RngMarch and 01-04-06 to 30-04-06 as RngApr and so on.. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sum values based on range of dates | Excel Discussion (Misc queries) | |||
sum of info in a range based on dates | Excel Worksheet Functions | |||
Summing based on a range of dates | Excel Discussion (Misc queries) | |||
Lookup based on range of dates | Excel Worksheet Functions | |||
return based on range of dates | Excel Worksheet Functions |