Formula Errors

Combine IF Conditions and Not-Equal Tests in an Excel Formula

Muhammad TalhaMuhammad Talha Dec 2, 2026 868 views

Question details

Combine optional cell values with separators, another cell reference, and a formatted date in one formula.

Combine IF Conditions and Not-Equal Tests in an Excel Formula
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants to build a text string from cells on a Form worksheet, a local cell, and a date.
Observed behavior
The desired result includes nonblank values, slash separators, the value of C3, and the date in K5 formatted as mm/dd/yyyy.
Before you start

Check that the worksheet is named Form, that E8:E10 contain the optional values, and that C3 and K5 are on the sheet where you will enter the formula. Make sure K5 contains a valid Excel date.

Solution 1Recommended

Use IF tests and concatenation to build the text

Use this formula when you want to include each nonblank value while keeping the slash separators in fixed positions.

1
Select the output cell

In Excel, open the worksheet containing C3 and K5 and click the cell where you want the combined text.

2
Enter the formula

In the formula bar, enter =IF(Form!E8<>"",Form!E8,"")&"/"&IF(Form!E9<>"",Form!E9,"")&"/"&IF(Form!E10<>"",Form!E10,"")&C3&" - "&TEXT(K5,"mm/dd/yyyy") and press Enter.

3
Check the result

Review the output cell. Each IF test includes its Form cell only when it is not empty, and TEXT displays K5 in month/day/year format.

Use IF tests and concatenation to build the text
Separators remain in place: The two slashes appear even if E8, E9, or E10 is blank. C3 follows E10 directly; add another quoted separator before C3 if you need one.
Use WPS Spreadsheet

Combine Conditional Values and Dates in WPS Spreadsheet

Use the same IF and TEXT formula in WPS Spreadsheet to combine optional values, separators, and a formatted date.

  1. 1. Open the workbook: Open WPS Spreadsheet and use File > Open to select your workbook.
  2. 2. Choose an output cell: On the sheet containing C3 and K5, click the cell where the combined text should appear.
  3. 3. Enter the formula: In the formula bar, enter =IF(Form!E8<>"",Form!E8,"")&"/"&IF(Form!E9<>"",Form!E9,"")&"/"&IF(Form!E10<>"",Form!E10,"")&C3&" - "&TEXT(K5,"mm/dd/yyyy") and press Enter.
  4. 4. Review and save: Check the output cell, then use File > Save or Save As to save the workbook.
Combine nonblank values with IF and the not-equal operatorFormat the date in the output with TEXTOpen and save Microsoft Excel .xlsx workbooksEdit formulas in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

What does <>"" mean in the formula?

It tests whether a cell's value is not an empty string. For example, IF(Form!E8<>"",Form!E8,"") returns E8's value when present and an empty string otherwise.

Why do slashes appear when a source cell is blank?

The slashes are outside the IF tests, so they are always included. The formula is designed to keep them in fixed positions.

How do I add a separator before C3?

In the formula bar, replace &C3 with &"/"&C3, or replace the slash inside the quotes with your preferred separator.

How can I use a different date format?

Edit the format string in TEXT(K5,"mm/dd/yyyy"). For example, use TEXT(K5,"dd-mmm-yyyy") to display a date such as 25-Dec-2026.

What if my worksheet has a different name?

Replace Form in each Form!E8, Form!E9, and Form!E10 reference with the actual worksheet name. If the name contains spaces, enclose it in single quotes, as in 'My Form'!E8.