ListA1 := “”:“”:“”:“X”:“”:“”:“X”;ListA2 := “A100”:“A101”:“A102”:“A103”:“A104”:“A105”:“A106”;
The list I want to return:
“”:“”:“”:“A103”:“”:“”:“A106”;
A simple @Replace( ListA1; “X”; ListA2 ) just puts “A100” in place of each “X”.
This has got to be simple, but it just won’t come to me this a.m. (Where’s that caffeine!)
Collin
Subject: List value swapping
I’d use a @For loop. Loop through ListA1, building a new list (say, ListB2) from its contents, but if you hit an “X”, get the value from ListA2 at the corresponding index.
Subject: List value swapping
ListJoined:=ListA1+"~"ListA2;@trim(@right(ListJoined;“X~”));
HTH - Rufus.
Subject: RE: List value swapping
Good formula, but drop the @Trim part to keep the empties.
Subject: RE: List value swapping
Doh - I’m so used to adding @Trim on to every list operation that I think my fingers must have typed it without my brain thinking.
Good spot!
Rufus.