-1
I have a macro to apply a formula to some cells. To be able to have the formula in VBA format I recorded the macro to generate it, but when I ran the macro it runs error 1004...
U Selection.FormulaR1C1 = _
"=IF(AND(RC5=Infos!R2C4,RC9='Premissas Financeiras'!R6C2,RC3='Premissas Financeiras'!R2C3),(-RC16*'Premissas Financeiras'!R6C3), IF(AND(RC5=Infos!R2C4,RC9='Premissas Financeiras'!R7C2,RC3='Premissas Financeiras'!R2C3),(-RC16*'Premissas Financeiras'!R7C3), IF(AND(RC5=Infos!R2C4,RC9='Premissas Financeiras'!R6C2,RC3='Premissas Financeiras'!R2C4),(-RC16*'Premissas Financ" & _
"6C4), IF(AND(RC5=Infos!R2C4,RC9='Premissas Financeiras'!R7C2,RC3='Premissas Financeiras'!R2C4),(-RC16*'Premissas Financeiras'!R7C4), IF(AND(RC5=Infos!R2C4,RC9='Premissas Financeiras'!R6C2,RC3='Premissas Financeiras'!R2C5),(-RC16*'Premissas Financeiras'!R6C5), IF(AND(RC5=Infos!R2C4,RC9='Premissas Financeiras'!R7C2,RC3='Premissas Financeiras'!R2C5),(-RC16*'Premissas F" & _
"s'!R7C5),))))))"
If anyone can help me! I don’t know what else to do because the range is set. Thank you
Ines, Welcome to Stack Overflow in English. Please click on edit and translate the question.
– Luiz Augusto