You have a couple of choices, using the And function it should look like if(salesman= sales man1.and. salesman = salesman2,1,0).
Or you could use the In or NotIn functions to have
Or alternatively you could use the NotIn to find those fields that do not have the required data.
I need to find a way to combine two key fields into my 'condition' within my 'if' function
for example if(salesman = 'salesman1'and 'salesman2',1,0)
the part ('salesman1' and 'salesman2') does not work.
I know there is way to go about this,
I just do not have the experience on functions and aggregations. /b[/quote]Vlad
Also you might need to use OR instead of AND. AND implies that both condiions are true at the same time. Also both conditions have to be spelled out in full, no shortcuts.
if(salesman = 'salesman1' .OR. salesman = salesman2',1,0)
Also see Nigel's suggestions about the .in. and .notin. they also would work fine.
[size="1"][ June 06, 2007, 01:40 PM: Message edited by: Bruce ][/size]
Nice suggestions above.
A very basic alternative (or two) would be along the lines of;