HERBERS Excel-Forum - das Archiv

Thema: Variable in Formel

Variable in Formel
Leitz

Hallo!
Hätte wieder einmal ein Anliegen! Bitte um Eure Hilfe.
Ich schreibe mit VBA folgende Formel in eine Zelle:
ActiveCell.FormulaR1C1 = "=IF(RC9>0,RC9*'% Preiserhöhung'!R5C3,"""")"
Wie kann ich das R5 ersetzen durch eine Variable (intPB)?
Mit besten Dank
G. Leitz

AW: Variable in Formel
Sheldon

Hallo G.,
ActiveCell.FormulaR1C1 = "=IF(RC9>0,RC9*'% Preiserhöhung'!" & intPB & "C3,"""")"
Gruß
Sheldon

Variable in Formel
Leitz

Hallo!
Hätte wieder einmal ein Anliegen! Bitte um Eure Hilfe.
Ich schreibe mit VBA folgende Formel in eine Zelle:
ActiveCell.FormulaR1C1 = "=IF(RC9>0,RC9*'% Preiserhöhung'!R5C3,"""")"
Wie kann ich das R5 ersetzen durch eine Variable (intPB)?
Mit besten Dank
G. Leitz

AW: Variable in Formel
Sheldon

Hallo G.,
ActiveCell.FormulaR1C1 = "=IF(RC9>0,RC9*'% Preiserhöhung'!" & intPB & "C3,"""")"
Gruß
Sheldon

Bewerten Sie hier bitte das Excel-Portal