Another Cell reference question

tmattioli

New Member
Joined
Apr 16, 2011
Messages
2
Hi,
I currently have this line of code in my VBA application:

Sheet2.Cells(row, 20).Formula = "=(Round( (RC[-3] /" & Sheet2.Cells(4, 10) & "),2))*100"

This produces:

=(ROUND( (Q12 /17.005),2))*100

I would like to replace the "Sheet2.Cells(4,10)" that places the value in the formula with the actual cell Reference (J4). I'm sure this is a very easy thing to do but for the life of me I can't figure it out. As you can tell I'm a newbie to VBA. Thanks in advance for your help.

Tony
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
run this as a one-liner in a test vba code and see if it helps
Code:
MsgBox Cells(4, 10).Address(0, 0)
 
Upvote 0
Thanks for the help. This does create an address but it's the same problem as with everything else I've tried in that it creates the following in the cell:

=(ROUND( (K13 /'J4'),2))*100

Everything I've tried puts those quote marks around the address.

Tony
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top