change formula dynamically

  • Thread starter Thread starter geebee
  • Start date Start date
G

geebee

hi,

i have the following in a cell:

=pivot!$D$70
so the cell is formattd as a percentage, like 3.0%

i would like to know if there is a way i can change this dynamically using
VBA, so it would read like *3.0%

I tried sheets("sheetname").range("C1").formula = "*" & "=pivot!$D$70" but
this did not work.

Im not sure how to make this work.

Thanks in advance,
geebee
 
After the formula goes in:

sheets("sheetname").range("C1").NumberFormat = """*""0.0%"
 

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