rrocker1405
Member
Hi,
Since I've a large data to work with when I use the array formula its takes a while to generate information thereby if I wanted use vba to generate results for me. However, my code gets a debugging prompt.
I'm trying to populate the results in column p with the following formula of excel which is using array for indexing.
=IFERROR(INDEX(Table3[ID],SMALL(IF(($N$3=Table3[TabEntType])*(COUNTIF($O$2:O2,Table3[ID])=0),ROW(Table3[TabEntType])-MIN(ROW(Table3[TabEntType]))+1,""),1)),"")
vba:
Thanks in advance.
Kind regards,
A!
Since I've a large data to work with when I use the array formula its takes a while to generate information thereby if I wanted use vba to generate results for me. However, my code gets a debugging prompt.
I'm trying to populate the results in column p with the following formula of excel which is using array for indexing.
=IFERROR(INDEX(Table3[ID],SMALL(IF(($N$3=Table3[TabEntType])*(COUNTIF($O$2:O2,Table3[ID])=0),ROW(Table3[TabEntType])-MIN(ROW(Table3[TabEntType]))+1,""),1)),"")
vba:
Code:
Sub Test()
Application.ScreenUpdating = False
With Worksheets("Sheet1")
With .Range("p3: P2500")
.FormulaR1C1 = "=IFERROR(INDEX(Table3[ID],SMALL(IF((R3C14=Table3[TabEntType])*(COUNTIF(R2C15:R[-1]C,Table3[ID])=0),ROW(Table3[TabEntType])-MIN(ROW(Table3[TabEntType]))+1,""),1)),"")"
.Value = .Value
End With
End With
Application.ScreenUpdating = True
End Sub
Thanks in advance.
Kind regards,
A!
Last edited by a moderator: