RIGHT
RIGHT(text, count)
Gives the last few characters of a piece of text, such as the sequence number at the end of a task code. It takes text only, so a number, a duration or a date has to go through TEXT first, and a blank stays blank.
Arguments
| Argument | What to give it |
|---|---|
| text | Text, like [Task code] or [Name]. A choice field such as [Status] works too. Blank gives blank. |
| count | How many characters, a number. Leave it out for one character. More characters than the text has gives the whole text. |
Examples
Formula=RIGHT([Task code], 3)
The last three characters of the task code: the sequence number when codes end in one.
Formula=RIGHT([Task code], 3) = "SUB"
TRUE for tasks whose code ends in SUB. Text equality ignores case, so "sub" matches too.
=RIGHT([Path], 4)
On a WBS row: the last four characters of the node's path.
Reach for something else when
| You want | Use |
|---|---|
| The first characters | LEFT |
| Characters from the middle | MID |
| Whether the text has something anywhere in it | CONTAINS |
Common questions
Is there an ENDSWITH?
No. Compare the end with RIGHT: RIGHT([Task code], 3) = "SUB". Like STARTSWITH, it ignores case, because = on text does.
