Hello,
Right now, I have a query pulling a bunch of data for a report by UnitName. I would like to group some of these units for display on a similar report. I've tried using multiple Iif statements:
Group: IIf([UnitName]="Unit A","Group A", Iif([UnitName]="Unit B","Group A", Iif([UnitName]="Unit C","Group B"...etc
The problem is, there are about 60 units to be sorted into 25 or so groups. This makes for a very long IIf statement which I would try to write, but it ends up being too long to insert into the query (I get an error). I'm sure there's a better way...what are my options? Thanks.
Right now, I have a query pulling a bunch of data for a report by UnitName. I would like to group some of these units for display on a similar report. I've tried using multiple Iif statements:
Group: IIf([UnitName]="Unit A","Group A", Iif([UnitName]="Unit B","Group A", Iif([UnitName]="Unit C","Group B"...etc
The problem is, there are about 60 units to be sorted into 25 or so groups. This makes for a very long IIf statement which I would try to write, but it ends up being too long to insert into the query (I get an error). I'm sure there's a better way...what are my options? Thanks.