Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That sounds like you don't really have a name called 'oneyear'. Check the
spelling of it again. -- HTH RP (remove nothere from the email address if mailing direct) wrote in message oups.com... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You may have Dimmed the name in VBA, not defined in the spreadsheet
If so, get it outside the quotes -- Kind regards, Niek Otten "Bob Phillips" wrote in message ... That sounds like you don't really have a name called 'oneyear'. Check the spelling of it again. -- HTH RP (remove nothere from the email address if mailing direct) wrote in message oups.com... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So many possible errors :-))
Bob "Niek Otten" wrote in message ... You may have Dimmed the name in VBA, not defined in the spreadsheet If so, get it outside the quotes -- Kind regards, Niek Otten "Bob Phillips" wrote in message ... That sounds like you don't really have a name called 'oneyear'. Check the spelling of it again. -- HTH RP (remove nothere from the email address if mailing direct) wrote in message oups.com... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Match formula to match values in multiple columns | Excel Discussion (Misc queries) | |||
Lookup Formula: Return 1st match, then 2nd match, then 3rd match | Excel Discussion (Misc queries) | |||
index(match) Wind Uplift Calculations (match four conditions) | Excel Worksheet Functions | |||
MATCH Multiple Criteria & Return Previous / Penultimate Match | Excel Worksheet Functions | |||
Lookup? Match? pulling rows from one spreadsheet to match a text f | Excel Worksheet Functions |