How to Convert Formula Result to Text String in Excel (7 Ways)

Our sample dataset contains sales information for a grocery store. We used an arithmetic formula and the TODAY and SUM functions in it. We are going to remove the formulas and keep the results as a text string.

excel convert formula result to text string intro


Method 1 – Using the Copy and Paste Feature to Convert a Formula Result to a Text String

Steps:

  • Select the cells or ranges that contain formulas.
  • Press Ctrl + C.

  • Right-click on any of the selected cells and select the Paste Option Paste Values’. You can see this option in both Paste Options: and Paste Special

excel convert formula result to text string using copy and paste

  • This will paste over the formula with its result.

  • To convert these values as text strings, you can simply change their format to text from the number format. However, it won’t provide the exact same look.
  • Select the cells that contain value and then go to Home, then choose Find & Select and pick Replace.

excel convert formula result to text string using copy and paste

  • In the Find and Replace dialog box, type 1 and ‘1 in the Find what and Replace with sections, respectively.
  • Click Replace All.

  • A notification box will show up saying how many replacements have been done. Click OK.

excel convert formula result to text string using copy and paste

  • You will see those dates as left-aligned text strings.

  • There is another column that contains formulas in my dataset. We converted the results to values in the same way.

excel convert formula result to text string using copy and paste

  • Select that range and go to the Number Format Group.
  • Choose the Text format.

  • The values are left-aligned so they are text strings.

excel convert formula result to text string using copy and paste


Method 2 – Applying a Keyboard Shortcut to Convert a Formula Result to Text

Steps:

  • Select the range of cells that contain formulas and press Ctrl + C or Ctrl + Insert.

  • Press Shift + F10. If you are using a laptop, you may need to press Shift + Fn + F10.
  • You will get the Context Menu.

excel convert formula result to text string using keyboard shortcut

  • Press V. The results of the formulas are converted to values.

  • Convert these dates to text strings like in Method 1.
  • Convert the Sales Price and Total Sales formula results to values by using the keyboard shortcut.
  • Convert these values to text strings like we did in Method 1.

excel convert formula result to text string using keyboard shortcut


Method 3 – Applying Excel VBA to Transform Formula Results to Text Strings

Steps:

  • Go to Developer and pick Visual Basic.

  • The VBA editor will open up. Select Insert and choose Module.

excel convert formula result to text string using VBA

  • Insert the following code in the VBA Module.
Sub ConvertToTextString()
Dim Range_Value As Range
Dim Cell_Value As Range
Set Range_Value = Selection
For Each Cell_Value In Range_Value
If Cell_Value.HasFormula Then
Cell_Value.Formula = Cell_Value.Value
End If
Next Cell_Value
End Sub

Code Explanation

  • We named the Sub Procedure ConvertToTextString.
  • We declared Range_Value and Cell_Value as Range.
  • We set Range_Value to Selection property.
  • We used a For Loop to convert the Cell Formulas to Cell Values.
  • Run the code.
  • Go back to your sheet, select the cells that contain formulas, and Run the Macro.

excel convert formula result to text string using VBA

  • This operation will convert the formula results to values, which means the formulas will disappear and just the values will remain.

  • To convert the Dates to text strings, follow Method 1.
  • To convert the Sales Price to text strings, follow Method 1.

excel convert formula result to text string

Read More: Excel VBA: Convert Formula to Value Automatically 


Method 4 – Using the Excel Power Query Editor to Convert Formula Results to Text

Steps: 

  • Select the whole dataset.
  • Go to Data and choose From Table/Range
  • A dialog box will show up. Select My table has headers.
  • Click OK.

  • You will see your data of formula results in a Power Query Editor.

excel convert formula result to text string using power query editor

  • Select Close & Load from the Home tab.

  • This will shift the data to a new sheet as a table. This table does not contain any formula, meaning all the formula results are converted to their corresponding values. You will also see that the dates are not properly formatted.

excel convert formula result to text string

  • To format the Dates properly, select them and go to the Number Group.
  • Select a Date Format.

  • Here are the converted dates.

excel convert formula result to text string

  • To convert the Dates to text strings, follow this link in Method 1.
  • To convert the Sales Price to text strings, follow Method 1.


Method 5 – Dragging Formula Results with the Mouse to Change Them to Text

Steps:

  • Select a range that contains formulas and place your cursor on any edge of the selected cells so that the marked icon.

excel convert formula result to text string

  • Hold the right-click button and move the range anywhere.

  • Place it in its previous position.
  • An option bar will appear. Select Copy Here as Values Only.

excel convert formula result to text string

  • This will convert the formula results to values.

  • Convert the Sales Price and Total Sales formula results to values.

excel convert formula result to text string

  • Convert the values to text by following Method 1.


Method 6 – Applying the TEXT Function to Transform Formula Results

Steps:

  • Use the following formula in cell B5:

=TEXT(TODAY(),"dd-mm-yy")

excel convert formula result to text string using TEXT function

  • Press Enter and you will see the Date in B5 as a text string.

  • Use the Fill Handle to AutoFill to the lower cells.

excel convert formula result to text string

  • Use the following formula in the F5 cell and use the Fill Handle to Autofill the Sales Price column.

=TEXT(D5*(1-E5),"0.00")

  • You can then remove the formula by following any of the methods above.

Read More:How to Convert Formula to Value Automatically in Excel


Method 7 – Converting Formula Results to Text Strings Using the CONCAT or CONCATENATE Function

Steps:

  • Use the following formula in cell B5:

=CONCAT(TODAY())

excel convert formula result to text string

Alternatively, use the CONCATENATE function.

=CONCATENATE(TODAY())

  • These functions implicitly convert its arguments to strings and return text strings as a result.
  • Press Enter.

excel convert formula result to text string

  • Output of the CONCATENATE function.

  • Use the Fill Handle to AutoFill the column.

excel convert formula result to text string using CONCAT or CONCATENATE function

  • To convert the dates to proper format, follow Method 4.
  • Use the following formula in the F5 cell and use the Fill Handle to Autofill the Sales Price column:

=CONCAT(D5*(1-E5))

  • The CONCATENATE function will give you the same result.
  • The Total Sales become 0 dollars because the sales prices are in text format. The SUM function can calculate the summation of values which are in text form.

Some Excel versions have only one option between CONCAT and CONCATENATE, so type the formula elsewhere and see which result is suggested.


Practice Section

We provided a practice sheet in the download file so you can test these methods.

excel convert formula result to text string


Download the Practice Workbook


Related Articles


<< Go Back to Convert Formula to Value in Excel | Excel Formulas | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Meraz Al Nahian
Meraz Al Nahian

Md. Meraz Al Nahian has worked with the ExcelDemy project for over 1.5 years. He wrote 140+ articles for ExcelDemy. He also solved a lot of user problems and worked on dashboards. He is interested in data analysis, advanced Excel, statistics, and dashboards. He also likes to explore various Excel and VBA applications. He completed his graduation in Electrical & Electronic Engineering from Bangladesh University of Engineering & Technology (BUET). He enjoys exploring Excel-related features to gain efficiency... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo