Onderstaande code plaatst formules in een aantal cellen.
Is het mogelijk om de RODE waarde telkens met één op te hogen?
Benieuwd of het mogelijk is.
Is het mogelijk om de RODE waarde telkens met één op te hogen?
Benieuwd of het mogelijk is.
Code:
Sub zet_formules()
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
'rij = 2
For x = 3 To 25
For y = 2 To 17 Step 2
For Z = 3 To 17 Step 2
Sheets(4).Cells(x, y).FormulaArray = _
"=IF(RC1="""","""",IF(OR(Werkplanning!R[COLOR="#FF0000"][B]2[/B][/COLOR]C3:R[COLOR="#FF0000"][B]2[/B][/COLOR]C18=RC1),RC1,""""))"
Sheets(4).Cells(x, Z).FormulaArray = _
"=IF(ROWS(R3C:RC)>COUNTA(R3C1:R30C1)-COUNTA((Werkplanning!R[COLOR="#FF0000"][B]2[/B][/COLOR]C3:R[COLOR="#FF0000"][B]2[/B][/COLOR]C18)),"""",INDEX(R3C1:R30C1,SMALL(IF(R3C[-1]:R30C[-1]="""",ROW(R3C[-1]:R30C[-1])-ROW(R3C[-1])+1),ROWS(R3C:RC3))))"
'rij = rij + 1
Next
Next
Next
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
End Sub