Add different values a number of times in a column

Hi,

I want to add different values a number of times in the same column. as an example to make it clear.
I have two columns (Plate and Well) Now I like to add a column( Dest Plate) and in this column there must be every 4 rows an other value. First 4 rows DP001A, row 5-8 DP002A, row 9-12 DP003A
Plate, Well, Dest Plate
1234, A3, DP001A
1234, A4, DP001A
1234, A5, DP001A
1234, A6, DP001A
1234, A13, DP002A
1234, A14, DP002A
1234, A15, DP002A
1234, A16, DP002A

is there a way to add a value a number of times in a column and then add another value in the next number of rows

Thanks,

Ron

Hi @RonG,

it depends on what do you want to fill the strings with. For the simple example that you have outlined one can:

  • first use Math Formula with floor(ROWINDEX / 4) converted to integer. This will generate a new column with a counter repeated four times;
  • then follow with String Manipulation and construct the string that you fancy.

If you logic is more complex than solution can differ a lot and in some scenarios it might be easier to switch to Java Snippet or an R/python script node.

Cheers,
Misha

3 Likes

Thanks Misha, with these two nodes i can solve the problem

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.