FreddieITA91
New Member
- Joined
- May 30, 2024
- Messages
- 4
- Office Version
- 2019
- Platform
- Windows
Hi all
i'm desperate. Ive this formula that needs to be calculated as matrix array on specific row. I think the problem is that it's too long.
i'm desperate. Ive this formula that needs to be calculated as matrix array on specific row. I think the problem is that it's too long.
VBA Code:
Dim formula As String
formula = "=IF(TEXTJOIN("","", TRUE, IF(G" & RowIndex & ":AAF" & RowIndex & " <> """", " & _
"IFERROR(LEFT(G" & RowIndex & ":AAF" & RowIndex & ", FIND(CHAR(10), G" & RowIndex & ":AAF" & RowIndex & ") - 1) & "":"" & " & _
"TEXT(G$3:AAF$3, ""dd-mm"") & "" ("" & G$1:AAF$1 & "")"", " & _
"G" & RowIndex & ":AAF" & RowIndex & " & ""("" & G$1:AAF$1 & "")""), """"), """"), " & _
"IF(TEXTJOIN("","", TRUE, IF(G" & RowIndex & ":AAF" & RowIndex & " <> """", " & _
"IFERROR(LEFT(G" & RowIndex & ":AAF" & RowIndex & ", FIND(CHAR(10), G" & RowIndex & ":AAF" & RowIndex & ") - 1) & "":"" & " & _
"TEXT(G$3:AAF$3, ""dd-mm"") & "" ("" & G$1:AAF$1 & "")"", " & _
"G" & RowIndex & ":AAF" & RowIndex & " & ""("" & G$1:AAF$1 & "")""), """"), """") <> """", " & _
"TEXTJOIN("","", TRUE, IF(G" & RowIndex & ":AAF" & RowIndex & " <> """", " & _
"IFERROR(LEFT(G" & RowIndex & ":AAF" & RowIndex & ", FIND(CHAR(10), G" & RowIndex & ":AAF" & RowIndex & ") - 1) & "":"" & " & _
"TEXT(G$3:AAF$3, ""dd-mm"") & "" ("" & G$1:AAF$1 & "")"", " & _
"G" & RowIndex & ":AAF" & RowIndex & " & ""("" & G$1:AAF$1 & "")""), """"), """")), " & _
"IF(F" & RowIndex & " <> """", ""DA-PIANIFICARE"", """"))"
Me.Cells(RowIndex, "D").FormulaArray = formula
Me.Cells(RowIndex, "D").Calculate
Me.Cells(RowIndex, "D").Value = Me.Cells(RowIndex, "D").Value