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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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,215,276
Messages
6,124,007
Members
449,139
Latest member
sramesh1024

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