peltier tech utilities
Learn how to create Excel dashboards.

Categories

30 Excel Functions in 30 Days

Archives

30 Excel Functions in 30 Days: 14 – T

Icon30DayWelcome to another weekend in the 30XL30D challenge, and you're probably exhausted from a long week of Excel work, and yesterday's complicated example for the TRANPOSE function. Saturday is the perfect time for a refreshing spot of T! And there's music today too! (No, that's not me wearing the fancy hat in today's video.)

For day 14 in the challenge, we'll examine the T function, which is one of the less useful ones. It tests a value for text, and other functions do the same thing, so do we even need T?

To decide, let's take a look at the T information and examples, and if you have other tips or examples, please share them in the comments.

Function 14: T

The T function returns the text from a value, or an empty string for no text.

T00

How Could You Use T?

The T function has very limited use, and could be replaced by other functions, such as ISTEXT. You can use T to:

  • Return text if value is text
  • Return an empty string if value is non-text

T Syntax

The T function has the following syntax:

  • T(value)
    • value can be any value -- typed in the formula, or a cell reference

T Traps

The T function returns an error if the value is an error, unlike ISTEXT, which returns FALSE for errors.

Example 1: Test If a Value is Text

I can't think of a situation where T would be preferable to another function, like ISTEXT. Let's compare the two functions, side by side, to see the results.

If a value is text, the T function returns that text. In the screenshot below, the T function is used in cell C4, to check the value in cell B3.

=T(B4)

That looks like a number in cell B4, but there's an apostrophe in front of it, so it's actually text. The T function returns the "1234" string. In column D, the ISTEXT function also tests the value in cell B4, and returns the result of TRUE.

=ISTEXT(B4)

T01

If the value is a number, as in cell B3, the T function result is an empty string. If you use ISTEXT instead, the result is FALSE.

For error values, the T function result is an error, and ISTEXT returns false.

T02

Download the T Function File

To see the formulas used in today's examples, you can download the T function sample workbook. The file is zipped, and is in Excel 2007 file format.

Watch the Tea for Two Video

With only one small example, there's not enough information to make a demo video for the T function, so here's a Saturday musical interlude instead -- Anita O'Day singing Tea for Two. And as we now know, =T(42) would return an empty string!

YouTube link: Tea for Two by Anita O'Day

_____________

Related Posts Plugin for WordPress, Blogger...

2 comments to 30 Excel Functions in 30 Days: 14 – T

  • Luke Wisbey

    T like N has it's uses... for ex. suppose we want to return the Text value from A1 if and only if it is Text else Null:

    =T(A1)

    would give us a Null string if A1 were blank or non-text and it's a pretty succinct approach given the alternatives:

    =IF(ISTEXT(A1),A1,"")

    =REPT(A1,ISTEXT(A1))

    though it should be noted that of the three the IF is the more robust (underlying errors).

  • Contextures Blog » 30 Excel Functions in 30 Days: Conclusion

    [...] T [...]

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>