How can i choose if WHAT = Sheets or Rows

I am making a report in which I want to create a lookup where I can choose
if the Customers are presented in rows or sheets (the lookup is already created and works fine).
The WHAT-Argument in the Wizard is a cell reference to a line were I have the information
rows=8 or sheets.
If i start the report there is no error, but only 1 Customer appears (there are more who fit the filters). When i write
manually that he should take rows or sheets everything works fine.
Here what i Have written:

=NL(Optionen!$D$12;"Debitor";"Nr.";"Nr.";NL("Union";NL("AllUnique";"Debitor";"Nr.";"Verkauf (MW)";">0";"Nr.";Optionen!$D$4);NL("AllUnique";"Debitor";"Nr.";"Nicht fakt. Lieferungen";">0";"Nr.";Optionen!$D$4));"Debitorenbuchungsgruppe";Optionen!$D$5)

Optionen!$D$12 contains:

Maybe someone can help (sorry for my bad english)


Please sign in to leave a comment.