Thread: #name in match
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] WHOLEministries@gmail.com is offline
external usenet poster
 
Posts: 1
Default #name in match

I am using vba in an automation routine.
As part of this, I have a column A full of dates.
"oneyear" is defined as a date.
"numberrows" is an integer that is determined earlier to identify the
number of rows in the range. It works.
I am using match because I want the row number identified.

Range("f2").Select
ActiveCell.FormulaR1C1 = "=match(oneyear,r[-1]c[-5]:r[" & numberrows -
2 & "]c[-5],1)"

After this code runs, I get a #Name? in F2.
I am not sure why. Any ideas would be appreciated.

TIA