Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I fill with a specific value the returned active cell from the
intersect of a calendar dates range in Row 1 (Col B thru ...) and any date from a Target dates list in Col. A ? Thank you for help. Celeste |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your question is not very clear, but perhaps something here.
Dim res as Variant, res2 as Variant Dim dt as Date dt = "some date" res = Application.Match(clng(date),rows(1),0) res2 = Application.Match(dt,Columns(1),0) if not iserror(res) and not iserror(res2) then cells(res2,res).Value = "Intersect" else msgbox "At least one date not found" End if -- Regards, Tom Ogilvy wrote in message oups.com... How do I fill with a specific value the returned active cell from the intersect of a calendar dates range in Row 1 (Col B thru ...) and any date from a Target dates list in Col. A ? Thank you for help. Celeste |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub ABC()
Dim cell as Range, res as variant for each cell in Range(Range("A2"),Range("A2").End(xldown)) res = application.Match(clng(cell),rows(1),0) if not iserror(res) then cells(cell.row,res).Value = cell.offset(0,1).Value end if Next End Sub this assumes the entries like 8/14 are actually stored as dates like 8/14/2006 in both row and column and formatted to show as m/dd -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Your question is not very clear, but perhaps something here. Dim res as Variant, res2 as Variant Dim dt as Date dt = "some date" res = Application.Match(clng(date),rows(1),0) res2 = Application.Match(dt,Columns(1),0) if not iserror(res) and not iserror(res2) then cells(res2,res).Value = "Intersect" else msgbox "At least one date not found" End if -- Regards, Tom Ogilvy wrote in message oups.com... How do I fill with a specific value the returned active cell from the intersect of a calendar dates range in Row 1 (Col B thru ...) and any date from a Target dates list in Col. A ? Thank you for help. Celeste |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
intersect named range in different workbook | Excel Discussion (Misc queries) | |||
Combine Intersect Range in If statements | Excel Discussion (Misc queries) | |||
Intersect check range | Excel Programming | |||
Is it possible to ensure Calendar date is in range | Excel Programming | |||
Is there a "Non-Intersect" VBA method to remove a sub-range from a range? | Excel Programming |