Formula to KNIME

=IF(OR(F32=“100003000”,F32=“105001000”),TRIM(F32&“-”&LEFT(P32,10)),IF(OR(F32=“115001100”,F32=“230004600”),TRIM(F32&“-”&I32&“-”&M32),IF(OR(F32=“115002000”,F32=“199010000”,F32=“199012100”,F32=“199013000”,F32=“199013080”,F32=“230004800”,F32=“270001000”,F32=“270006310”,F32=“270007100”,F32=“299001000”,F32=“115004300”,F32=“115001300”,F32=“230001200”,F32=“500011200”,F32=“720000700”,F32=“720000900”),TRIM(F32&“-”&I32),TRIM(F32))))

=IF(OR(F32=$F$2,F32=$F$3,F32=$F$4,F32=$F$5),“T”,IF((V32=“950074100”),“N/A”,LEFT(F32,1)))

IF(
OR(
$F32$ = “100003000”,
$F32$ = “105001000”
),
TRIM($F32$ & “-” & LEFT($P32$, 10)),
IF(
OR(
$F32$ = “115001100”,
$F32$ = “230004600”
),
TRIM($F32$ & “-” & $I32$ & “-” & $M32$),
IF(
OR(
$F32$ = “115002000”,
$F32$ = “199010000”,
$F32$ = “199012100”,
$F32$ = “199013000”,
$F32$ = “199013080”,
$F32$ = “230004800”,
$F32$ = “270001000”,
$F32$ = “270006310”,
$F32$ = “270007100”,
$F32$ = “299001000”,
$F32$ = “115004300”,
$F32$ = “115001300”,
$F32$ = “230001200”,
$F32$ = “500011200”,
$F32$ = “720000700”,
$F32$ = “720000900”
),
TRIM($F32$ & “-” & $I32$),
TRIM($F32$)
)
)
)

IF(
OR(
$F32$ = $F$2,
$F32$ = $F$3,
$F32$ = $F$4,
$F32$ = $F$5
),
“T”,
IF(
$V32$ = “950074100”,
“N/A”,
LEFT($F32$, 1)
)
)

Hi @charabor1

I think this is Excel and the outcome is 42.

gr. Hans

4 Likes

@HansS But we should have waited another 7.5 million years to get this answer :joy:

@charabor1 give us some more details to understand the issue, we can’t know what this formula does, if it’s correct and what data it is handling. always remember to give a little context, state the problem/objective and provide some data/workflow :slight_smile: when you are ready, we are here

Have a nice evening,
Raffaello Barri

4 Likes

@charabor1 just for the fun of it I let ChatGPT figure this one out and come up with a working yet maybe un-managable Java Snippet Code and also create some sample data by guessing … enjoy :slight_smile:

edit: to give this a more helpful touch. @charabor1 maybe you want to take a look at a similar problem and the use of Column Expressions:

5 Likes

Just paste the formula in this workflow then voila

1 Like