# IFUNCTION



## markdst (Dec 19, 2022)

Hi All

I have a spreadsheet to print table place cards, where all the data is collated from another table where the guests name and food choices are, which is then pulled through to a different sheet with the place cards, the place card tabs have 2 pages in inside them as the sheets of place cards we use has 6 per page so we are always wasting 2 place cards when printing them, more if they tables are less than 10. 

My question is : Is there a work around / formula that I could use ( baring in mind the place card cells already have an xlookup formula inside them to pull back the choices =XLOOKUP(1,Data!O3:U3,Data!$O$2:$U$2,"NO MAIN")  ) that would skip the row of blanks / zeros / empty seat and automatically pull in the next guests name and choices so I do not land up with any blank place cards?


----------



## jdellasala (Dec 19, 2022)

I'd suggest using the *FILTER* function instead of XLOOKUP. For the *include* parameter, surround each parameter with parenthesis, and between each parenthesis use multiplication for AND parameters, and addition for OR parameters. such as

```
=FILTER( Data, (Data[FoodChoice]="NO STARTER")*(Data[FoodChoice]="NO MAIN")*(Data[FoodChoice]="NO DESERT"))
```
To indicate people that are not eating. Replacing all of the multiplications (*) with addition (+) would return all people that don't want one or more item.


----------



## markdst (Dec 19, 2022)

jdellasala said:


> I'd suggest using the *FILTER* function instead of XLOOKUP. For the *include* parameter, surround each parameter with parenthesis, and between each parenthesis use multiplication for AND parameters, and addition for OR parameters. such as
> 
> ```
> =FILTER( Data, (Data[FoodChoice]="NO STARTER")*(Data[FoodChoice]="NO MAIN")*(Data[FoodChoice]="NO DESERT"))
> ...


Hi

Thanks for the reply, I'm not sure whether you misunderstood my problem or I cannot understand your reply. See example in my screen shots. When the data pulls through onto the place cards tab if there is a blank ( empty seat ) I want to make it ignore the blank data line and pull in the next choice and put it into the next place card. Does that make sense?


----------



## jdellasala (Dec 19, 2022)

markdst said:


> Hi
> 
> Thanks for the reply, I'm not sure whether you misunderstood my problem or I cannot understand your reply. See example in my screen shots. When the data pulls through onto the place cards tab if there is a blank ( empty seat ) I want to make it ignore the blank data line and pull in the next choice and put it into the next place card. Does that make sense?


Post the data using *XL2BB*.


----------

