Hello everyone,
the following routine copies in each row of columns from A to E the correspondent Index+Match formula.
How can I change the code in order to have only the result of the formula in each cell, instead of the formula itself?
Thank you for any help
the following routine copies in each row of columns from A to E the correspondent Index+Match formula.
How can I change the code in order to have only the result of the formula in each cell, instead of the formula itself?
Thank you for any help
VBA Code:
Sub FormulaFill()
Dim LastRowColumnF As Long
Sheets("Report").Select
LastRowColumnF = Cells(Rows.Count, 6).End(xlUp).Row
Range("E5:E" & LastRowColumnF).Formula = "=INDEX(Tabella2[AGENT],MATCH('Report'!RC[1],Tabella2[Customer],0))"
Range("D5:D" & LastRowColumnF).Formula = "=INDEX(Tabella2[PROVINCE],MATCH('Report'!RC[2],Tabella2[Customer],0))"
Range("C5:C" & LastRowColumnF).Formula = "=INDEX(Tabella2[COUNTRY],MATCH('Report'!RC[3],Tabella2[Customer],0))"
Range("B5:B" & LastRowColumnF).Formula = "=INDEX(Tabella2[PHONE],MATCH('Report'!RC[4],Tabella2[Customer],0))"
Range("A5:A" & LastRowColumnF).Formula = "=INDEX(Tabella2[E-MAIL],MATCH('Report'!RC[5],Tabella2[Customer],0))"
End Sub