Forum Discussion

Diane's avatar
Diane
Copper Contributor
Jan 09, 2025
Solved

Meal cards

Marketing insists on giving me her spreadsheet like this. Currently I just have to sort out each column and print separately. The problem then becomes her wanting "couples" to stay together. So I can...
  • Patrick2788's avatar
    Jan 09, 2025

    If your actual data is as clean as the sample provided with only 1 meal choice per row and no other anomalies then you could use:

    =TOCOL(IF(meal_choice,meal,NA()),3)

    The IF checks for a 1 and if found, switches it with the meal in the column. If there's no 1 then return an error.  TOCOL converts all to a vector and discards blanks and errors. If the data is bit more complex then a more sophisticated solution can be drawn up.

     

Resources