Formula R1C1

Blobajob88

Board Regular
Joined
Mar 27, 2020
Messages
55
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi,

Can anyone break this line of code down for me:

Range("A" & Cells.Rows.Count).End(xlUp).Offset(1, 9).Select
activecell.FormulaR1C1 = _
"=SUBSTITUTE(IF((IFERROR(VLOOKUP(RC[-5],[Methodology.xlsm]DATA!R1320C[-8]:R1576C[-8],1,FALSE),""""))<>"""",VLOOKUP(RC[-5],[Methodology.xlsm]DATA!R1220C[-8]:R1576C[-8],1,FALSE),""""),""-"",""_"")"
Selection.AutoFill Destination:=Range(activecell, Range("I2")), Type:=xlFillDefault

Especially the R1220C..:R1576C part

Thanks

Ben
 

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.
R1220 = Row 1220.
C[-8] means the column 8 to the left of the formula cell.
Similarly:
R1576 = Row 1576
C[-8] = 8 columns to the left. So in A1 style that would be A1220:A1576
 
Upvote 0

Forum statistics

Threads
1,214,813
Messages
6,121,706
Members
449,049
Latest member
THMarana

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