Ravindra BagaleCourses & study guides

5. Data Cleaning A–Z

5.2 Blank Cells

Two different problems: blank cells that should repeat the value above (typical of exported reports), and completely blank rows.

Before

City Area Orders
Pune Kothrud 412
Baner 356
Wakad 298
Nagpur Dharampeth 275
Sitabuldi 241

After

City Area Orders
Pune Kothrud 412
Pune Baner 356
Pune Wakad 298
Nagpur Dharampeth 275
Nagpur Sitabuldi 241

Steps in Excel – fill blanks with the value above

  1. Select A2:A7 (the City column).
  2. Home › Editing › Find & Select › Go To Special › Blanks › OK. Only the empty cells are selected.
  3. Type = and press ↑ (the formula becomes =A2 for the first blank) and press Ctrl + Enter – it fills every selected blank.
  4. Select the column › Copy › Paste Special › Values so the formulas become fixed text.

Steps – delete fully blank rows

  1. Add a helper column: =COUNTA(A2:C2); filter it for 0 › select the visible rows › Home › Cells › Delete › Delete Sheet Rows › remove the filter.
  2. (Careful shortcut) Go To Special › Blanks › Delete › Entire row works only when a blank in one column means the whole row is empty.

For true missing values (e.g. a blank Delivery Mins), don't invent numbers. Mark them ("Not recorded"), count them with =COUNTBLANK(), and decide with your manager whether to exclude those rows.

Ravindra Bagale's Tip

After Go To Special › Blanks, when they do Delete › Entire row, many students lose real data too – because a row had only one empty cell. Before deleting a row, check with a COUNTA helper whether the whole row is empty. And after Ctrl + Enter, don't forget Paste Values, otherwise the values get mixed up when you sort.

Practice task

Take a city-wise report where City is written only once per group; fill the blanks with Go To Special + Ctrl + Enter, then remove two fully blank rows using a COUNTA helper.