How To X Out A Cell In Excel

Excel is an incredibly versatile tool, providing numerous functionalities that allow us to streamline our workflow. One such feature that might not be immediately apparent is the ability to “X out” a cell. Essentially, this means drawing a diagonal cross through a cell. This can be particularly useful when you want to visually mark a cell as complete or irrelevant.

Steps to X Out a Cell in Excel

Unfortunately, Excel doesn’t have a direct function to draw an “X”, but there’s a little trick that we can use that involves the border options. Here’s how it’s done:

  1. Select the cell that you want to X out.
  2. Go to the Home tab on the Ribbon.
  3. Click on the Font dialog box launcher (small little arrow on the bottom right corner).
  4. This will open a new window. Switch to the Border tab.
  5. In the Border tab, select Diagonal Down in the presets.
  6. Click on OK.

The cell should now have a line running from the top left to the bottom right. To complete the X, follow the same steps but choose Diagonal Up in step 5.

Using VBA to X Out a Cell

If you want to X out cells frequently, the above method can be a bit time-consuming. A faster way can be using a VBA (Visual Basic for Applications) macro. Here’s how to do it:

  1. Press Alt + F11 to open the VBA editor.
  2. Go to Insert > Module to create a new module.
  3. Paste the following code into the module:
  Sub Xout()
    With Selection.Borders(xlDiagonalDown)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlDiagonalUp)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
  End Sub
  

After running this macro, any cell you select and run the macro on will be X’ed out.

Excel’s versatility is one of its significant strengths, allowing users to customize their sheets to a great extent. While it may not have a built-in function to “X out” a cell, some creativity with its existing features or a bit of simple programming can easily achieve the desired effect.