user112947
user112947

Reputation: 473

Excel: how to insert a hyphen for blank rows?

I know you can insert a hyphen for a blank cells, but I can't insert a hyphen for multiple cells that are blank. Excel does not seem to have a feature for that, but has one for one blank cell.

Can someone please help me? Any help would be appreciated.

enter image description here

(I put the hyphens manually just as an example)

Upvotes: 1

Views: 26423

Answers (3)

user7021244
user7021244

Reputation: 11

Type an apostrophe then the hyphen like this " '- " and the apostrophe disappears, but the hyphen stays.

Upvotes: 1

pnuts
pnuts

Reputation: 59485

Try:

Select ColumnF, HOME > Cells – Format, Format Cells…, Custom, in the Type: box enter:

General;-General;-  

then click OK.

A number format can have up to four sections of code, separated by semicolons. These code sections define the format for positive numbers, negative numbers, zero values, and text, in that order.

POSITIVE;NEGATIVE;ZERO;TEXT

ref

Upvotes: 2

zx8754
zx8754

Reputation: 56219

Select fields, press CTRL+G (goto) Special, select Blanks, type - then press CTRL+ENTER.

EDIT:

As OP clarified that Column F is a formula, try this:

=IF(SUM(C2:E2)=0,"-",SUM(C2:E2))

Upvotes: 9

Related Questions