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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,221,418
Messages
6,159,793
Members
451,589
Latest member
Harold14

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