Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
R1C1 and A1 style conflict in formula problem
Hi the code below generates error 1004, i think it's because I'm mixing
formula styles. Is there any way to rewrite this formula and make it work? thanks in advance Sheets(CFPBEY).Select Range("E11:E20000").ClearContents ColLoc1 = pbeyeydesc - pbeydescchg ColLoc2 = pbeyeydesc - pbeyorigtrdesc Dim test As String test = "=IF(RC[-" & ColLoc1 & "]<0,VLOOKUP(RC[-" & ColLoc1 & "],'" & RT & "'!$A$5:$B$" & _ intUniqueTrDesc & ",2,FALSE),VLOOKUP(RC[-" & ColLoc2 & "],'" & RT & "'!$A$5:$B$" & _ intUniqueTrDesc & ",2,FALSE))" Sheets(CFPBEY).Range(Cells(StartRow, pbeyeydesc), Cells(intNumOfTrDesc + HdrRow, pbeyeydesc)).Formula = test '_ ' "=IF(RC[-" & ColLoc1 & "]<0,VLOOKUP(RC[-" & ColLoc1 & "],'" & RT & "'!$A$5:$B$" & _ ' intUniqueTrDesc & ",2,FALSE),VLOOKUP(RC[-" & ColLoc2 & "],'" & RT & "'!$A$5:$B$" & _ ' intUniqueTrDesc & ",2,FALSE))" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using INDIRECT & R1C1 Ref style | Excel Worksheet Functions | |||
Sum Indirect Using R1C1 Style | Excel Worksheet Functions | |||
How do I change sheet notation from R1C1 style to A1 style in XL 2 | Setting up and Configuration of Excel | |||
How to use/evaluate another Cell Formula in R1C1 style | Excel Programming | |||
can a1 reference style and r1c1 style be used in same formula? | Excel Worksheet Functions |