Formula Errors

How to Return Text from One Cell When Another Contains a Date in Excel

Natalie TaylorNatalie Taylor Nov 2, 2026 869 views

Question details

The user needs a formula to display text from a specific cell only when an adjacent cell contains a date, keeping the result blank if the date cell is empty.

How to Return Text from a Cell When Another Contains a Date in Excel
Product
Excel
Device & OS
not provided
Scenario
Creating a project or customer tracker where a customer name should automatically appear only if a completion date has been entered in another column.
Observed behavior
The user is looking for the correct logical formula to conditionally extract the customer name based on the presence of a date without showing errors or zeroes.
Before you start

Ensure your spreadsheet has a dedicated column for dates and another for the text you want to pull. Verify that the empty date cells are truly blank and do not contain hidden spaces.

Solution 1Recommended

Use the IF Function to Check for Blank Cells

The simplest and most effective way to display text based on another cell's content is by using Excel's built-in IF function to check if the target cell is empty.

By utilizing the IF function, you can set a logical test that determines whether the cell containing the date is blank. If it is blank, you can command Excel to return an empty string. If it is not blank (meaning a date has been entered), Excel will pull the text from your desired cell.

1
Select the destination cell

Click on the cell (e.g., J13) where you want the customer name to appear conditionally.

2
Enter the IF formula

Type the formula `=IF(G13="","",A13)`, replacing G13 with your date cell reference and A13 with your text cell reference.

3
Apply the formula

Press Enter. If the date cell is empty, the formula cell will also appear empty. If a date is present, it will show the customer name.

4
Copy the formula down

Click the fill handle in the bottom-right corner of the cell and drag it down to apply this logic to the rest of the rows in your tracker.

Use the IF Function to Check for Blank Cells
Formula Breakdown: The formula checks if G13 is empty (""). If true, it returns an empty string (""). If false, it fetches the text from A13.
Efficient Spreadsheet Management

Master Logical Formulas with WPS Spreadsheet

Easily apply IF and OFFSET conditional formulas using WPS Spreadsheet. It offers a highly compatible and intuitive interface to manage your project trackers and extract data effortlessly.

  1. 1. Open your file: Launch WPS Spreadsheet and open the workbook containing your project data.
  2. 2. Input the formula: Select the target cell and enter the `=IF(G13="","",A13)` conditional formula.
  3. 3. Auto-fill your column: Press Enter and double-click the fill handle to seamlessly populate the entire column automatically.
  4. 4. Save your progress: Save your document in .xlsx format to ensure full cross-platform compatibility.
Fully compatible with Microsoft Excel formulas like IF, OFFSET, and VLOOKUP.Smart auto-fill capability lets you easily drag complex formulas across thousands of rows.Lightweight software that quickly processes large datasets without lagging or crashing.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my IF formula return a 0 instead of a blank cell?

If your formula is written as `=IF(G13="", ,A13)` without the empty quotes `""`, the spreadsheet defaults to returning a 0 for the empty condition. Ensure you strictly type `""` in the 'value_if_true' argument to return a completely blank cell.

Can I make the IF formula check specifically for dates rather than just non-blank cells?

Yes, although spreadsheets lack a native ISDATE function. Because dates are stored as serial numbers, you can check if the cell contains a number using `=IF(ISNUMBER(G13), A13, "")`. This ensures text entries in the date column won't accidentally trigger the formula.

What if I want to return data from a completely different worksheet?

You can reference another sheet by adding the sheet name followed by an exclamation mark before the cell reference. For example: `=IF(Sheet1!G13="","",Sheet1!A13)` will check the blank status on Sheet1 and pull the text from Sheet1 to your current active sheet.