Function Problems

Combine Excel Cell Values into a Sentence with a Duration

Phi Hung VoPhi Hung Vo Dec 2, 2026 868 views

Question details

Combine form values into a readable sentence with formatted currency, a duration in months, and line breaks.

Combine Excel Cell Values into a Sentence with a Duration
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants to combine values from multiple worksheet cells into a formatted description.
Observed behavior
The desired result is a single cell containing the values, the number of complete months between two dates, and text on separate lines.
Before you start

Check that the start and end cells contain valid Excel dates and that the end date is not earlier than the start date. Identify the cells containing your text, amount, location, and other form values.

Solution 1Recommended

Use a Concatenation Formula with TEXT and DATEDIF

Combine the values, format the amount, and calculate complete months in one formula.

In this example, A2 contains a text value, C2 the amount, D2 the start date, E2 the end date, G2 the location, H2 the geographic focus, and F10 additional text. Replace these references with the cells in your worksheet.

DATEDIF with the "m" unit counts complete months, not partial months.

1
Enter the formula

Select an empty result cell and enter =A2&" | "&TEXT(C2,"$#,##0")&" | "&DATEDIF(D2,E2,"m")&" month(s)"&CHAR(10)&"Location: "&G2&", US Geo Focus: "&H2&CHAR(10)&F10.

2
Show the line breaks

With the result cell selected, choose Home > Wrap Text. Adjust the row height if all lines are not visible.

3
Check the result

Review the result cell and update the formula's cell references or labels to match your form. Change the TEXT format code to "$#,##0.00" if you need cents.

Use a Concatenation Formula with TEXT and DATEDIF
Formatting part of the result: An Excel formula cannot make only part of its returned text bold. You can format the entire result cell, or copy and paste the result as a value before manually formatting part of the text.
Work with spreadsheet formulas in WPS

Combine Form Values and Calculate Duration in WPS Spreadsheet

Use WPS Spreadsheet to join cell values, format currency, calculate complete months, and display the result on multiple lines.

  1. 1. Open your workbook: Open WPS Spreadsheet and select Open to load your Excel workbook.
  2. 2. Enter the formula: Select an empty cell and enter =A2&" | "&TEXT(C2,"$#,##0")&" | "&DATEDIF(D2,E2,"m")&" month(s)"&CHAR(10)&"Location: "&G2&", US Geo Focus: "&H2&CHAR(10)&F10. Replace the references with your own cells.
  3. 3. Display the lines: Select the result cell and choose Home > Wrap Text, then adjust the row height if needed.
  4. 4. Save the workbook: Choose File > Save As and select an Excel workbook format such as XLSX.
Combine form values and date durations in one cellFormat currency and display line breaks with Wrap TextOpen and save Microsoft Excel XLSX filesUse familiar spreadsheet formulas and controls
QA img-9

Frequently Asked Questions

How do I calculate partial months between two dates?

DATEDIF(D2,E2,"m") counts only complete months. If you need partial months, first decide how to measure a fraction of a month, then use a formula suited to that convention.

Why are the line breaks not visible in my result?

Select the result cell and choose Home > Wrap Text. If the lines are still clipped, increase the row height.

How can I show cents in the combined currency value?

Change the TEXT portion of the formula to TEXT(C2,"$#,##0.00") to display two decimal places.

Can I make just the location label bold?

A formula cannot apply bold to only part of its result. Copy the result cell, use Paste Special > Values, and then manually format the desired text in the cell.