![]()
Sub test1() Dim testing As Integer Dim region As Range Dim region2 As Range Dim region3 As Range Dim i As Integer Dim j As Integer Dim k As Integer i = 0 j = 0 k = 0 For j = 0 To 11 For i = 0 To 11 For k = 0 To 5 Worksheets("Lista_lunara_repere").Activate Set region = ActiveSheet.Range(Cells(11, i * 6 + 5), Cells(50, i * 6 + 9)) Set region2 = ActiveSheet.Range(Cells(11, i * 6 + 5), Cells(55, i * 6 + 5)) Set region3 = ActiveSheet.Range(Cells(11, i * 6 + 9), Cells(55, i * 6 + 9)) Worksheets("TestMacro").Activate testing = Application.index(region, Application.Match(Cells(j * 16 + 3, 3) & Cells(j * 16 + 3, k * 1 + 4), region2 & region3, 0), 4) Cells(j * 16 + 4, 4).Value = testing Next k Next i Next j End Sub
Hello,
I am trying to replace a lot of index forumlas that have started to slow my workbook down quite a lot with a macro that i hope will help me reduce "operating" time.
This setup works up untilli added another condition and another range for the match part wich i guess turned the "formula" into an array. Now i get a run-time error '13': type mysmatch. Help preety plz.
Bookmarks