Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to create dynamic reference table name in Excel
  • How to conditionally sum numeric data in an Excel table using SUMIFS
  • How To Compare Two Lists in Excel
  • How to calculate correlation coefficient Correlation in Excel
  • Working With Tables in Excel

References

  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation
  • Complete List of Excel Lookup and Reference Functions, References and Examples
  • How to get first column number in range in Excel
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Merge tables with VLOOKUP in Excel

Data Validations

  • Excel Data validation allow uppercase only
  • Excel Data validation specific characters only
  • Excel Data validation whole percentage only
  • Excel Data validation number multiple 100
  • Excel Data validation must contain specific text

How to convert text string to array in Excel

by

To convert a string to an array that contains one item for each letter, you can use an array formula based on the MID, ROW, LEN and INDIRECT functions. This can sometimes be useful inside other formulas that manipulate text at the character level.

 Formula

{=MID(string,ROW(INDIRECT("1:"&LEN(string))),1)}

Note: this is an array formula and must be entered with control + shift + enter.

Explanation

In the example shown, the formula in C5 is:

{=MID(B5,ROW(INDIRECT("1:"&LEN(B5))),1)}

How this formula works

Working from the inside out, the LEN function calculates the length of the string, and this is joined by concatenation to “1:”, creating a text range like this: “1:3”

This text is passed into INDIRECT, which evaluates the text as a reference and returns the result to the ROW function. The ROW function returns the rows contained in the reference in an array of numbers like this:

{1;2;3}

Notice we have one number for each letter in the original text.

This array goes into the MID function, for the start_num argument. The text comes from column B, and the number of characters is hardcoded as 1

Finally, with multiple start numbers, MID returns multiple results in an array like this.

{"R";"e";"d"}

Post navigation

Previous Post:

Get day from date in Excel

Next Post:

Calculate loan interest in given year in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IF, AND, OR and NOT Functions Examples in Excel
  • Invoice status with nested if in Excel
  • How to use Excel TRUE Function
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel OR Function

Date Time

  • Convert text date dd/mm/yy to mm/dd/yy in Excel
  • How to calculate project start date based on end date in Excel
  • Get days before a date in Excel
  • Calculate number of hours between two times in Excel
  • Display Days in month in Excel

Grouping

  • Map text to numbers in Excel
  • How to randomly assign people to groups in Excel
  • Group arbitrary text values in Excel
  • Calculate conditional mode with criteria in Excel
  • Map inputs to arbitrary values in Excel

General

  • Advanced Number Formats in Excel
  • Zoom Worksheet in Excel
  • Currency vs Accounting Format in Excel
  • How to add sequential row numbers to a set of data in Excel
  • Share Excel data with Word documents
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning