If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Count and change name
Could someone please help me add these together into a text box on a report.
After I count the results (a) I need to change the name (b). (a). This code give me a count per location: ="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " & IIf(Count(*)=1,"Cases","Cases") & ")" (b).This code groups the location and changes the name: IIf([tr_gbu]="SE" Or [tr_gbu]="EC","MIAMI",IIf([tr_gbu]="NC" Or [tr_gbu]="NE" Or [tr_gbu]="NW" Or [tr_gbu]="WC" Or [tr_gbu]="SW","JACKSONVILLE",Null)) Any advise would be appreciated. |
#2
|
|||
|
|||
Count and change name
(a). This code give me a count per location:
="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " & IIf(Count(*)=1,"Cases","Cases") & ")" The IIf return "Cases" in both case, I assume you want to change it to ="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " & IIf(Count(*)=1,"Case","Cases") & ")" ***** (b).This code groups the location and changes the name: IIf([tr_gbu]="SE" Or [tr_gbu]="EC","MIAMI",IIf([tr_gbu]="NC" Or [tr_gbu]="NE" Or [tr_gbu]="NW" Or [tr_gbu]="WC" Or [tr_gbu]="SW","JACKSONVILLE",Null)) To make it shorter =IIf([tr_gbu] In ("SE" ,"EC"),"MIAMI",IIf([tr_gbu] In ("NC" ,"NE" ,"NW" ,"WC","SW"),"JACKSONVILLE",Null) ************************** Now, what do you mean abou changing the name? Do you want to join them together? ="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " & IIf(Count(*)=1,"Case","Cases") & ") " & IIf([tr_gbu] In ("SE" ,"EC"),"MIAMI",IIf([tr_gbu] In ("NC" ,"NE" ,"NW" ,"WC","SW"),"JACKSONVILLE",Null) -- Good Luck BS"D "Dan @BCBS" wrote: Could someone please help me add these together into a text box on a report. After I count the results (a) I need to change the name (b). (a). This code give me a count per location: ="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " & IIf(Count(*)=1,"Cases","Cases") & ")" (b).This code groups the location and changes the name: IIf([tr_gbu]="SE" Or [tr_gbu]="EC","MIAMI",IIf([tr_gbu]="NC" Or [tr_gbu]="NE" Or [tr_gbu]="NW" Or [tr_gbu]="WC" Or [tr_gbu]="SW","JACKSONVILLE",Null)) Any advise would be appreciated. |
#3
|
|||
|
|||
Count and change name
Fantastic - Thank you.......
"Ofer Cohen" wrote: (a). This code give me a count per location: ="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " & IIf(Count(*)=1,"Cases","Cases") & ")" The IIf return "Cases" in both case, I assume you want to change it to ="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " & IIf(Count(*)=1,"Case","Cases") & ")" ***** (b).This code groups the location and changes the name: IIf([tr_gbu]="SE" Or [tr_gbu]="EC","MIAMI",IIf([tr_gbu]="NC" Or [tr_gbu]="NE" Or [tr_gbu]="NW" Or [tr_gbu]="WC" Or [tr_gbu]="SW","JACKSONVILLE",Null)) To make it shorter =IIf([tr_gbu] In ("SE" ,"EC"),"MIAMI",IIf([tr_gbu] In ("NC" ,"NE" ,"NW" ,"WC","SW"),"JACKSONVILLE",Null) ************************** Now, what do you mean abou changing the name? Do you want to join them together? ="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " & IIf(Count(*)=1,"Case","Cases") & ") " & IIf([tr_gbu] In ("SE" ,"EC"),"MIAMI",IIf([tr_gbu] In ("NC" ,"NE" ,"NW" ,"WC","SW"),"JACKSONVILLE",Null) -- Good Luck BS"D "Dan @BCBS" wrote: Could someone please help me add these together into a text box on a report. After I count the results (a) I need to change the name (b). (a). This code give me a count per location: ="Total for Location:" & " " & [TR_GBU] & " (" & Count(*) & " " & IIf(Count(*)=1,"Cases","Cases") & ")" (b).This code groups the location and changes the name: IIf([tr_gbu]="SE" Or [tr_gbu]="EC","MIAMI",IIf([tr_gbu]="NC" Or [tr_gbu]="NE" Or [tr_gbu]="NW" Or [tr_gbu]="WC" Or [tr_gbu]="SW","JACKSONVILLE",Null)) Any advise would be appreciated. |
Thread Tools | |
Display Modes | |
|
|