0

we are booking a training and we are trying to convert a description of what seats we have into a columnn list so we can automatically allocate our students to a class.

Eg the the description of the seats description cell looks like:

Cell F5: TrainingRoom1/E 17-18 (2) , TrainingRoom1/J 21-24 (4) , TrainingRoom1/F 19-21 (3) , TrainingRoom1/H 21-24 (4) , TrainingRoom1/K 21-25 (5) , TrainingRoom1/N 21-24 (4) , TrainingRoom1/M 21-25 (5) , TrainingRoom1/P 23-25 (3)

We want to turn this into a couple of columns that looks like:

  • ColumnA:Room ,
  • ColumnB:SeatNumber
  • ColumnC:Email (will be allocated later)

Results would look like:

  • TrainingRoom1 --- E17
  • TrainingRoom1 --- E18

1 Answer 1

1

Here's a possible solution:

=ARRAYFORMULA(LET(
   data,WRAPROWS(SPLIT(F5,"/ (),-"),5),
   SPLIT(
     REDUCE(TOCOL(,1),SEQUENCE(ROWS(data)),
       LAMBDA(a,i,VSTACK(a,
         INDEX(data,i,1)&"|"&INDEX(data,i,2)&
         SEQUENCE(INDEX(data,i,5),1,INDEX(data,i,3))))),"|")))

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.