Forum Discussion
JetJungle
Dec 12, 2018Copper Contributor
Create text string from input
Is there a formula that creates a text string as shown below from the following inputs: Period Start 4 Period End 6 Factor 0.5 Text string 4|0.5;5|0.5;6|0.5 The text string is in a format th...
- Dec 12, 2018
Are you familiar with User Defined Functions? I believe the function below would do what you are after.
Function PeriodString(PeriodStart As Integer, PeriodEnd As Integer, Factor As String)
Dim i As Integer
For i = PeriodStart To PeriodEnd
If i = PeriodEnd Then
PeriodString = PeriodString & i & "|" & Factor
ElsePeriodString = PeriodString & i & "|" & Factor & ";"
End If
Next i
End Function
Detlef_Lewin
Dec 12, 2018Silver Contributor
Hi
{=TEXTJOIN(";",TRUE,ROW(INDIRECT(A2&":"&B2))&"|"&C2)}