Question for Frank K

  • Thread starter Thread starter Ritchie
  • Start date Start date
R

Ritchie

I tried the Round function but I get a type mismatch error
when the macro hits that line of the code. I was using
the activecell.formulasR1C1 instead of a E3 * P3.

Below is the code. Am I doing something wrong or is Round
not compatible with a formula?

Do Until IsEmpty(ActiveCell.Offset(0, -2)) = True
ActiveCell.FormulaR1C1=Round("=R[0]C[-1] * R[0]C[7]", 2)
ActiveCell.Offset(1, 0).Select
Loop

I think I used the forumlaR1C1 because the percentage in
P3 can change after the macro is run and we wanted the
spreadsheet to update.

Thanks for all of the help....
 
Hi
just a minor error :-)
try
ActiveCell.FormulaR1C1="=Round(R[0]C[-1] * R[0]C[7], 2)"
 
Thank you very much. I haven't been doing this very long
and I appreciate the help. Thanks again.
-----Original Message-----
Hi
just a minor error :-)
try
ActiveCell.FormulaR1C1="=Round(R[0]C[-1] * R[0]C[7], 2)"

--
Regards
Frank Kabel
Frankfurt, Germany
I tried the Round function but I get a type mismatch error
when the macro hits that line of the code. I was using
the activecell.formulasR1C1 instead of a E3 * P3.

Below is the code. Am I doing something wrong or is Round
not compatible with a formula?

Do Until IsEmpty(ActiveCell.Offset(0, -2)) = True
ActiveCell.FormulaR1C1=Round("=R[0]C[-1] * R[0]C[7]", 2)
ActiveCell.Offset(1, 0).Select
Loop

I think I used the forumlaR1C1 because the percentage in
P3 can change after the macro is run and we wanted the
spreadsheet to update.

Thanks for all of the help....
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top