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 |
#11
|
|||
|
|||
An IIF statement for a single character(s) Only
Remember that and IIf statement has three parts: logical test, True and
False You can test one logical test and if it is false, you can embed another IIf statement in the false section... IIf ( [Field] = ":", True Statement, False statement) or defined further IIf ( [Field] = ":", 1, FalseStatement) or define further IIf ( [Field] = ":", 1, IIf ( [Field] = "W", 1, IIf ( [Field] = ":W", 1, IIf ( [Field]="W:", 1, 0) ) ) ) This would give you the 4 possible combinations of : & W "sdg8481" wrote in message ... Hi please help, In a field i have variuos characters that represents orders, there is an indefinative number of combinations, all along the following lines; W:WY W:W W:YY W:WG W:QGWY :WW :YWQ etc...with a hundred possible options including an unlimited number of characters. However, basically all i want is a simple IIF statement, whereby if the field only contains a ':' or/and 'W' character then put a 1, otherwise put a 0. For example, if the field contains W:WW, then i want a 1 to appear If the field contains WWY, then i want a 0 to appear I hope this makes sense. Thanks |
|
Thread Tools | |
Display Modes | |
|
|