H
Hari
Hi,
I have some dates in column E (starting from 31-Jan-2005 to 31-Oct-09
-- 3 Month stretch)
If I put the following formula in my excel worksheet
=MATCH(TODAY()-1,$E$2:$E$21,1)
then I get the correct value as 6.
But If I write in VBA
RowNoForReportRange = Application.WorksheetFunction.Match(Date - 1,
TargetWkbook.Worksheets(LegendSt).Range("$E$2:$E$21").Value, 1)
Then the answer I get is 15. Am not able to figure out why?
Could somebody please guide me.
Regards,
HP
India
I have some dates in column E (starting from 31-Jan-2005 to 31-Oct-09
-- 3 Month stretch)
If I put the following formula in my excel worksheet
=MATCH(TODAY()-1,$E$2:$E$21,1)
then I get the correct value as 6.
But If I write in VBA
RowNoForReportRange = Application.WorksheetFunction.Match(Date - 1,
TargetWkbook.Worksheets(LegendSt).Range("$E$2:$E$21").Value, 1)
Then the answer I get is 15. Am not able to figure out why?
Could somebody please guide me.
Regards,
HP
India