Printing Problems

Print Only Excel Rows with Visible Formula Results in WPS Spreadsheets

John WilsonJohn Wilson Nov 13, 2026 869 views

Question details

The user wants to print only rows in a worksheet where formulas return a visible result, skipping rows whose formula cells display empty strings.

Print Only Excel Rows with Visible Formula Results in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
An Excel-compatible worksheet contains formulas across many rows, and only rows displaying formula results should appear in the printout.
Observed behavior
A standard VBA CountA approach counts formula cells as non-empty even when they return empty strings, so rows that look empty are still printed.
Before you start

Confirm that formula cells that should be skipped return "" rather than a space or 0, because spaces and zeros are visible characters. If you plan to use the VBA method, enable the Developer tab in WPS Spreadsheets first.

Solution 1Recommended

Use a temporary worksheet and VBA to print only rows with visible formula results

Best when you need a repeatable macro that prints exactly the rows whose formulas display results without changing the original worksheet.

The accepted VBA approach copies the selected range to a temporary worksheet, hides rows where every visible cell value is empty, prints the temporary sheet, and then deletes it. Avoid relying on CountA or Count because those functions count cells that contain formulas even when the displayed result is an empty string.

1
Open the macro editor

In WPS Spreadsheets, open the workbook, click the Developer tab, and then click Visual Basic or Macros. If the Developer tab is not visible, enable it from the ribbon options.

2
Insert a new module

In the macro editor, click Insert > Module. Paste a macro that copies the selected range to a new worksheet, loops through each row, and hides a row only when no cell has a visible text value. In the row check, use Trim(cell.Value & "") instead of CountA.

3
Select the print range and run the macro

Return to the worksheet, select only the rows and columns you want to print, then press Alt+F8, choose the macro, and click Run. The macro prints the temporary worksheet and then deletes it.

4
Check the print result

After the first run, review the printed output. If page settings need changes, adjust Page Setup on the temporary worksheet before printing or use Print Preview in WPS Spreadsheets.

Use a temporary worksheet and VBA to print only rows with visible formula results
Original data stays intact: This method hides rows only in the temporary copy and deletes that copy after printing, so your original worksheet, formulas, and formatting remain unchanged.
WPS Spreadsheets

Print only rows with visible formula results in WPS Spreadsheets

WPS Spreadsheets gives you the tools to control exactly which formula rows appear in your printout. Use a helper-column filter or a VBA temporary-sheet macro to hide formula cells that return empty strings, then print only the visible result rows without altering your original workbook.

  1. 1. Open your workbook: Launch WPS Office and open the Excel-compatible workbook that contains the formula rows you need to print.
  2. 2. Select the formula range: Select only the rows and columns that contain the formula results you want to evaluate for printing.
  3. 3. Apply a print filter or macro: Use the helper-column filter method or the VBA temporary-sheet method described above to isolate rows with visible results.
  4. 4. Preview and print: Click Print in WPS Spreadsheets, choose Print Active Sheet, check the preview, and print only the rows that display formula results.
  5. 5. Save in Excel format: Save the workbook as .xlsx to keep formulas and future print settings compatible with Microsoft Excel.
Print rows with visible formula results while skipping empty-string formula rowsUse Excel-compatible formulas, filters, and VBA macros in WPS SpreadsheetsOpen and save .xlsx, .xls, and other Microsoft Office formats with full compatibilityKeep your original worksheet and formulas unchanged during print filteringFree and lightweight Office interface with familiar ribbon and print tools
microsoft office alternative - wps office

Frequently Asked Questions

Why does my printout include rows that look empty when I use VBA CountA?

CountA counts cells that contain a formula, even if the formula returns an empty string. Use a temporary-sheet macro that checks the visible text value with Trim(cell.Value & "") or use a helper column that measures LEN(TRIM(...)).

Can I print only rows with visible formula results without VBA?

Yes. Add a helper column with a formula such as =IF(SUMPRODUCT(--(LEN(TRIM(A2:Z2))>0))>0,"Print","Skip"), copy it down, filter to "Print", and then print the active sheet.

How do I open the macro editor in WPS Spreadsheets?

Enable the Developer tab from the ribbon options, then click Developer > Visual Basic or Macros. If your version supports the shortcut, Alt+F11 also opens the macro editor.

Will the temporary-sheet VBA method change my original worksheet?

No. It copies the selected range to a temporary worksheet, hides empty rows only in that copy, prints it, and then deletes the temporary sheet. The original worksheet remains unchanged.

Which Microsoft Office formats can WPS Spreadsheets open and save for this task?

WPS Spreadsheets supports .xlsx, .xls, and other Excel-compatible formats, so you can open a formula workbook, apply the print filter, and save it back without losing Excel compatibility.