Formula Not Working Properly
Hi,
It sounds like calculation is set to manual
E2003
Tools|Options|calculation tab and select automatic
E2007
Formulas tab|Calculation options and select automatic
--
Mike
When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
"PHisaw" wrote:
Hi Mike,
Thanks for the reply. It worked on filling down the column, but the formula
still isn't calculating properly. It fills in the same amount all the way
down which is the calculated amount for Q2. If I click on Q3 and then click
in the function in the function bar, it will highlight with different colored
boxes the cells in the equation. When I click the check mark to the left of
formula, it calculates that cell with the correct answer.
What am I doing wrong? I'm very much a novice with vba, but am very
impressed with how much automation can be accomplished with macros. Again,
any help is greatly appreciated.
Thanks,
Pam
"Mike H" wrote:
Hi,
Maybe this which will fill down as far as there are data in column O
Range("Q2").Select
ActiveCell.FormulaR1C1 =
"=IF(OR(RC15={30,0}),RC7,IF(AND(rc15=""cc""),IF(OR (RC3={""mdu"",""kiu"",""cvu""}),RC7+90,RC7+30)))"
Lastrow = Cells(Cells.Rows.Count, "O").End(xlUp).Row
Range("Q2:Q" & Lastrow).FillDown
--
Mike
When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
"PHisaw" wrote:
I have the formula below and have tried copying it down column in macro. It
will calculate the first cell "Q2" properly, but copies the same calculation
from Q2 to all other cells. If I click in the formula and then the check
mark to the left of formula, it calculates properly in the cell.
How can I make it calculate properly from the macro? Also the range will
change with each import to the worksheet the macro is applied to. How can I
write the macro to apply to all cells in column Q where there is data in
other columns in formula?
Range("Q2").Select
ActiveCell.FormulaR1C1 = _
"=IF(OR(RC15={30,0}),RC7,IF(AND(rc15=""cc""),IF(OR (RC3={""mdu"",""kiu"",""cvu""}),RC7+90,RC7+30)))"
Range("Q2:Q78").FillDown
Thanks in advance for any help available.
Pam
|