What Is a Text String in Excel?

What Is a Text String in Excel? thumbnail
Text strings and values are different types of data

Microsoft Excel, like other spreadsheet programs, can store and manipulate a variety of different types of data (information), and text strings are one such data type. A text string is any free-form data you enter into Excel, such as names and addresses in a mailing list. In fact, "text string" is a bit of a misnomer--it should probably just be called a "string", as a string will (almost) always be text in Excel.

  1. An Example

    • Say you have a club membership list in Excel. The kind of information you might store would include forenames, surnames, addresses, membership numbers, dates of birth, membership type and date of membership expiry. Each cell you have entered something into contains data, and this example includes several different data types.

    Text Strings and Numbers

    • Entries in the name columns will be text strings -- you just type in the name and Excel takes it at face value (it doesn't try and interpret it as anything else). Most of the address fields will be text strings too -- although a house number will be treated as a numerical value (unless you type in an apostrophe before the number) so this is an exception. The same goes for the membership number if it is made up just of digits (e.g., 12345). If it has letters in it too (e.g., A1234) then Excel will treat it as a text string, because the "A" means it doesn't recognize it as a number.

    Dates

    • Not all the data you enter will be text strings (or numbers). If you type in a date of birth Excel will recognise it as a date and remember it as a "date-time code". You may notice that you can get Excel to present the date in several different formats, for example if you type in "08/21/1980" you can format the cell to show this as "1980-08-21", or "August 21, 1980". Excel can do this because it recognises the date as a particular type of data, not as just a text string.

    Functions

    • Perhaps you use a function to highlight a member whose renewal date is coming up soon, by subtracting the renewal date from today's date. The function itself is not a text string, it is a short set of instructions for Excel to follow. You might USE a text string within the function though, and if you did you would put it in quote marks (e.g., "Renewal due in ").

    Summary

    • A "text string" sounds like a high concept in computer science, but in essence it is very simple -- a bunch of characters you enter into a cell that Excel doesn't recognise as something specific. Things like numerical values, dates or functions are recognised as specific types of data so these are not text strings.

Related Searches:

References

  • "Excel VBA Programming for Dummies"; John Walkenbach; 2004
  • Photo Credit number background image by kuhar from Fotolia.com

Comments

You May Also Like

Related Ads

Featured