Range("O2").FormulaR1C1 = _
"=IF('Verizon Cells & ACards'!RC13=""Current"",IF(SUMIFS('Verizon Cells & ACards'!C14,'Verizon Cells & ACards'!C3,'Verizon Cells & ACards'!RC3)=VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,6)-VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,5)+1,0,VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,6)-VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,5)+1-SUMIFS('Verizon Cells & ACards'!C14" & _
"n Cells & ACards'!C3,'Verizon Cells & ACards'!RC3)),0)"
Range("N2").FormulaR1C1 = _
"=IF(ISBLANK(RC7),(VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,6)-VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,5))+1,IF(ISBLANK('Verizon Cells & ACards'!RC8),IF('Verizon Cells & ACards'!RC7<(VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,5)),VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,6)-VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,5)+1,IF('Verizon Cells & ACards'!RC7>(VLOOKUP" & _
"y Decl'!R1C2,BillingPeriods,6)),0,VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,6)-'Verizon Cells & ACards'!RC7+1)),IF('Verizon Cells & ACards'!RC8<VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,5),0,IF('Verizon Cells & ACards'!RC8>VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,6),IF('Verizon Cells & ACards'!RC7>VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,6),0,IF('Verizon Cells" & _
"'!RC7<(VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,5)),VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,6)-VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,5)+1,VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,6)-'Verizon Cells & ACards'!RC7+1)),IF('Verizon Cells & ACards'!RC7>VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,6),0,IF('Verizon Cells & ACards'!RC7<(VLOOKUP('Cost by Decl'!R1C2," & _
"riods,5)),'Verizon Cells & ACards'!RC8-(VLOOKUP('Cost by Decl'!R1C2,BillingPeriods,5)),'Verizon Cells & ACards'!RC8-'Verizon Cells & ACards'!RC7+1))))))"
Any help will be greatly appreciated. And before anyone offers it, I did double-check that it' susing the ..." & _" syntax for long vba code. I couldn't find anything more for multiple lines of code in a formula.
Bookmarks