Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

spaces

ResolvedVersion 365

Zara has attended:
Excel Advanced course

SPACES

Hi,

1. What's the best way to remove multiple spaces between cells on a sheet?

2. How can I arrange a list of IP addresses in numerical order by the 4 octet? (the last 2/3 digits after the last decimal)?

Thank you

RE: SPACES

Hello Zara,

Thank you for your question.

1. If you're referring to empty columns between data cells/ranges, select the columns along their headers and press delete.

If you're referring to random patterns of empty cells/ranges between data cells/ranges, it's best to select and drag existing data cells/ranges closer to other data cells/ranges using the mouse.

If you're referring to spaces between characters inside cells, you can do one of two things:

a. Use the =TRIM function to remove spaces before and after a string and all but one space inside strings.

b. Use Replace to remove all spaces in cells. In 'Find what' type one space and in 'Replace with' type nothing.

2. To sort by last digits, insert a new column next to the IP column. In the new column, next to the first IP address, type the digits after the last decimal point of that IP address.

Enter this and click back on the cell you typed in. Then, in the Home tab, click the Fill button (in the Editing group), then click Flash Fill. This will fill all the digits after the last decimals down the column.

When you sort this new column, it will sort all columns in the table.

I hope this helps.

Kind regards
Marius Barnard
STL







Fri 4 Feb 2022: Automatically marked as resolved.

Excel tip:

Using an equal (=) sign that isn't part of a formula

Before you type the equal sign, type an apostrophe: '
Then type your equal sign: = (and anything else you want to add after your equal sign)
Press ENTER.

(the apostraphe will disappear

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.