Miscellaneous
# | OBJECTIVE | PROG | CODE | NOTES |
---|---|---|---|---|
1 |
If-Then Statement |
EXCEL |
In the results cell, type: =If(C4=3,2,4) |
|
2 |
If-Then Statement |
ACCESS |
In a created query field, type: IIf([FieldName]=3,2,4) |
Note the two "I"s in "IIF". |
3 |
If-Then Statement |
BRIO |
Formula Definition Box: if (FieldName == "One" ) {1 } else {0 } |
Make sure this is created in the "Results" tab, and not the "Query" tab. Also, numerical results do not need the quotes. Also notice that there are no commas, as in Excel and Access. Also, the "I" and "e" cannot be capitalized. |
4 | If-Then Statement |
BRIO | Formula Definition Box: =if([Model]="Mustang" ; "Ford Car" ; "Non-Ford" ) |
|
5 |
If-Then Statement (Nulls) |
BRIO |
Formula Definition Box: if (MCO ==Null ) {'Null' } else {'Not Null'} |
Make sure this is created in the "Results" tab, and not the "Query" tab. Also, numerical results do not need the quotes. Also notice that there are no commas, as in Excel and Access. Also, the "I" and "e" cannot be capitalized. |
6 |
If-Then Statement (With Wildcard) |
BRIO |
Formula Definition Box: =If ( Match ( [Lienholder Field] ; " *LEASE* " ) ; "Leased Car" ; "Not Leased Car" ) |
|
7 |
Multiple If-Then Statements |
ACCESS |
In a created query field, type: IIf([FieldName]="Y","A Is Y",IIf([FieldName]="N","A Is N",IIf([FieldName]="X","A Is X","None"))) |
|
8 |
If-Then (Multiple Conditions) |
BRIO |
Formula Definition Box: =If ( [Model]="Mustang" ; "Ford Car" ; If ( [Model]= "Camaro" ; "Chevy Car" ; "Non-Ford/Chevy" ) ) |
|
9 |
If-Then Statement (Multiple conditions & Choices) |
BRIO |
Formula Definition Box: =If ( [Make] InList("Ford" ; "Chevy" ; "Dodge" ) ; "American Car" ; "Foreign Car" ) |
|
10 |
Multiple If-Then Statements |
BRIO |
Formula Definition Box: if(TIN==111111111) {'A'} else {if(TIN==222222222) {'B'} else {if(TIN==333333333) {'C'} else {'Z'}}} |
|
11 |
Reference The Tab Name In A Cell |
EXCEL |
Simply type this in: =RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1))) |
Paste this in, exactly as it is. Don't do anything with the "filename". This is cool! |
12 |
M For Million Dollar Groupings |
EXCEL |
Custom Format: $0,, "M" will display $2 M for $2,123,456 Custom Format: $0.0,, "M" will display $2.1 M for $2,123,456 Custom Format: $0.00,, "M" will display $2.12 M for $2,123,456 |
|
13 |
K For Thousand Dollar Groupings |
EXCEL |
Custom Format: $###.0, "K" will display $6.5 K for $6,462.21 Custom Format: $###.00, "K" will display $6.46 K for $6,462.21 |
|
14 |
Logic for either K or M (Option 1) |
EXCEL |
Custom Format: [>=1000000]$0,, "M";$0, "K" will display either K or M. Or Custom Format: [>=1000000]$0.0,, "M";$0.0, "K" will display either K or M. |
Two options here, one for decimals, and one without. |
15 |
M For Million Dollar Groupings |
POWERPOINT |
Custom Format: $#,###" M" will display $12 M for $12,251,111.23 |
|
16 |
Crosstabs With Null Values |
ACCESS |
Many times in a crosstab query, you count the number of records, and have a null when there is no record. To get rid of the null, and display a zero, simply go into the design view, and under the "Value" column, use the following formula: CLng(Nz(Count([field to count]),0)) |
Not using the CLng function will display values that are in text, instead of numeric. |
17 |
Subtotal A Column |
EXCEL |
=SUBTOTAL(9,C6:C200) |
In this example, we want to subtotal the values in column-C, from rows 6 through 200. The "9" designates a sum. Other values include: 1=Avg, 2=Count, 4=Max, 5=Min |
18 | Outlook Email |
ACCESS | This can be used in an Access form to send an Outlook email. Here is the syntax and structure for building a typical procedure. You will need to make sure your Access dataabse has the Microsoft Outlook refrence set in the module. |
|
19 |
Transferring Data |
ACCESS / EXCEL |
There are three methods of transferring data in Access, with each having its own benefits and disadvantages. They are: |
|
20 |
||||
21 |
||||
22 |
||||
23 |
||||
24 |