Forum Discussion
Meal cards
- 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.
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.
Perfect! Thank you so much!
- Patrick2788Jan 11, 2025Silver Contributor
Glad I could help. You're welcome!