Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveCell.FormulaR1C1 =
"=IF(AND((VALUE(YEAR($I6)&MONTH($I6))<=(VALUE(2004 &N$5))),(VALUE(YEAR($J6)&MONTH($J6))=VALUE(2004&N $5))),1,0)" |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For starters, you've used FormulaR1C1, which requires the cell references to
be in R1C1 format. You've used A1 style references. In R1C1 notation, you need to know the row number and column number of the active in order to convert them. If the active cell is A1, $I6 is R[5]C9, N$5 is R5C[13]. The numbers inside the brackets specify the offset from the active cells. Rather than converting all of them, try using the Formula property instead <g. On Wed, 27 Oct 2004 15:19:05 -0700, "mmattson" wrote: ActiveCell.FormulaR1C1 = "=IF(AND((VALUE(YEAR($I6)&MONTH($I6))<=(VALUE(200 4&N$5))),(VALUE(YEAR($J6)&MONTH($J6))=VALUE(2004& N$5))),1,0)" |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are using A1 notation and FormulaR1C1, try
ActiveCell.Formula = _ "=IF(AND((VALUE(YEAR($I6)&MONTH($I6))<=(VALUE(2004 &N$5))),(VALUE(YEAR($J6)&M ONTH($J6))=VALUE(2004&N$5))),1,0)" -- HTH RP "mmattson" wrote in message ... ActiveCell.FormulaR1C1 = "=IF(AND((VALUE(YEAR($I6)&MONTH($I6))<=(VALUE(2004 &N$5))),(VALUE(YEAR($J6)&M ONTH($J6))=VALUE(2004&N$5))),1,0)" |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Myrna
You wrote: Rather than converting all of them, try using the Formula property instead <g. Is this a way of converting R1C1 back to A1 notation quickly? I noticed the grin. TIA Bob C. --- "Myrna Larson" wrote: For starters, you've used FormulaR1C1, which requires the cell references to be in R1C1 format. You've used A1 style references. In R1C1 notation, you need to know the row number and column number of the active in order to convert them. If the active cell is A1, $I6 is R[5]C9, N$5 is R5C[13]. The numbers inside the brackets specify the offset from the active cells. Rather than converting all of them, try using the Formula property instead <g. On Wed, 27 Oct 2004 15:19:05 -0700, "mmattson" wrote: ActiveCell.FormulaR1C1 = "=IF(AND((VALUE(YEAR($I6)&MONTH($I6))<=(VALUE(200 4&N$5))),(VALUE(YEAR($J6)&MONTH($J6))=VALUE(2004& N$5))),1,0)" |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No. I meant that changing the function to Formula is much quicker than leaving
it as FormulaR1C1 and figuring out the R1C1 references. To do the latter, you would stuff your existing formula into a string, then use the Application.ConvertFormula method to convert it to R1C1 On Wed, 27 Oct 2004 21:01:02 -0700, Robert Christie wrote: Hi Myrna You wrote: Rather than converting all of them, try using the Formula property instead <g. Is this a way of converting R1C1 back to A1 notation quickly? I noticed the grin. TIA Bob C. --- "Myrna Larson" wrote: For starters, you've used FormulaR1C1, which requires the cell references to be in R1C1 format. You've used A1 style references. In R1C1 notation, you need to know the row number and column number of the active in order to convert them. If the active cell is A1, $I6 is R[5]C9, N$5 is R5C[13]. The numbers inside the brackets specify the offset from the active cells. Rather than converting all of them, try using the Formula property instead <g. On Wed, 27 Oct 2004 15:19:05 -0700, "mmattson" wrote: ActiveCell.FormulaR1C1 = "=IF(AND((VALUE(YEAR($I6)&MONTH($I6))<=(VALUE(200 4&N$5))),(VALUE(YEAR($J6)&MONTH($J6))=VALUE(2004& N$5))),1,0)" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Question on this conversion code switching between r1c1 to A1 format tia sal2 | Excel Worksheet Functions | |||
Question on this conversion code switching between r1c1 to A1 format tia sal2 | Excel Discussion (Misc queries) | |||
Question on this conversion code switching between r1c1 to A1 format tia sal2 | Excel Worksheet Functions | |||
Converting code to R1C1 format | Excel Programming | |||
what's wrong with my code???? | Excel Programming |