Philippe31
New Member
- Joined
- Oct 26, 2023
- Messages
- 9
- Office Version
- 2021
- Platform
- Windows
Hi everyone. I'm new in VBA and i have a issue with VBA Code
I try to copie a formula on a range of cell but it's doesn'T work,
Can you help me.
It a index formula
I want the index formula to apply for the entire range.
I don't know if I went about it the right way.
Thank for helping
I
I try to copie a formula on a range of cell but it's doesn'T work,
Can you help me.
It a index formula
I want the index formula to apply for the entire range.
I don't know if I went about it the right way.
VBA Code:
Sub paste_data()
Dim lastCell As Range
Dim targetRange As Range
Set lastCell = Cells(5, Columns.Count).End(xlToLeft).Offset(0, 1)
Set targetRange = Range(lastCell, lastCell.Offset(200, 0))
targetRange.FormulaR1C1 = "=IFERROR(INDEX(Billing_Summary!R1C1:R999C2,MATCH(RC3,Billing_Summary!R1C1:R999C1,0),14),"""")"
End Sub
Thank for helping
I