Simple formula not working

deduwa

Board Regular
Joined
Jul 28, 2015
Messages
110
I am getting #NAME ? when executing the below code. Cell F5 in the Manual tab has a number in it so expecting the output to also be a number.

Cells(lastRow + 11, "R").Formula = "=R[-1]C/(Manual!F5)"

I get #NAME ? and when I press F2 on this erroneous cell it shows =R253/Manual!'F5'

I am not sure the ' around the F5 looks correct either.

Can anyone help

Thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
You're mixing the RC type reference with the A1 type reference in the same formula. Try:

Cells(lastRow + 11, "R").Formula = "=R[-1]C/(Manual!R5C6)"
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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