R1C1 formula not working

Gokuba

New Member
Joined
Aug 6, 2018
Messages
19
HI ,
I am trying to run my code , but it suddenly gives an error when at the last formula.
The mentioned formula works corectlly in excel and the R1C1 is build via print Activecell.FormulaR1C1.
How can I correct it?
MY formul ain excel = =IFNA(INDEX('RMS WELCOME'!C:M,MATCH(E3,'RMS WELCOME'!C:C,0),10),"NO PO's")


Code:
Sub forfill()
Dim MYR As Range
Dim llastrow As Variant


Sheets("My INT").Activate
lastrow = Cells(rows.Count, "P").End(xlUp).row
Range("P3:P" & [lastrow]).FormulaR1C1 = "=IFNA(INDEX('RMS WELCOME'!C[-13]:C[-3],MATCH(RC[-11],'RMS WELCOME'!C[-13],0),7),0)"
Range("Q3:Q" & [lastrow]).FormulaR1C1 = "=IFNA(INDEX('RMS WELCOME'!C[-14]:C[-4],MATCH(RC[-12],'RMS WELCOME'!C[-14],0),8),0)"
Range("R3:R" & [lastrow]).FormulaR1C1 = "=IFNA(INDEX('RMS WELCOME'!C[-15]:C[-5],MATCH(RC[-13],'RMS WELCOME'!C[-15],0),9),0)"
[COLOR=#ff0000]Range("S3:S" & [lastrow]).FormulaR1C1 = "=IFNA(INDEX('RMS WELCOME'!C[-16]:C[-6],MATCH(RC[-14],'RMS WELCOME'!C[-16],0),10),"NO PO's")"[/COLOR]


End Sub
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,224,813
Messages
6,181,111
Members
453,021
Latest member
Justyna P

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