Excel: Clean and Reformat Telephone Numbers

Leave a comment

I am recently working on a project where there are some many different formats of telephone numbers in one column that I needed to clean  it up.  Well, I found a site called ExcelJet that supplied the formula called Substitute and the explanation.

clean-and-reformat-telephone-numbers

How this formula works

The formula runs from the inside out, with each SUBSTITUTE removing one character.

The inner most SUBSTITUTE removes the left parentheses, and the result is handed to the next SUBSTITUTE, which removes the right parentheses, and so on.

Whenever you use the SUBSTITUTE function, the result will be text. Because you can’t apply a number format to text, we need to convert the text to a number. One way to do that is to add zero (+0), which automatically converts numbers in text format to numbers in numeric format.

Finally, the “Special” telephone number format is applied (column D).

White space trick for better readability

When nesting multiple functions, it can be difficult to read the formula and keep all parentheses balanced. Excel doesn’t care about extra white space in a formula, so you can add line breaks in the formula to make the formula more readable. For example, the formula above can be written as follows:

=SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
A1,
“(“,””),
“)”,””),
“-“,””),
” “,””),
“.”,””)

Note that the cell appears in the middle, with function names above and substitutions below. Not only does this make the formula easier to read, it also makes it easier to add and remove substitutions.

Just remember that you have to copy the new results in a blank column as Paste Values Only!!

You can use this same trick to make nested IF statements easier to read as well.

Thank You ExcelJet!

Excel-Repeat Data to Selected Cells

Leave a comment

What a great trick to use in Excel.  Select several blank cells. Type what you want to repeat in those selected cells and hit Control+Enter keys.  The information is entered in all of the selected cells. This eliminates you to type in one cell and then to use the autofill function.

Enjoy!

EXCEL: Using Convert Formula

Leave a comment

To convert miles to kilometers:

  1. Select cell E5 and type =CONVERT(. or Click on Formulas Tab, More Functions, Engineering, Convert)
  2. Click the Paste Function button to access the Function Arguments window.
  3. Select cell D5, which holds the value you wish to convert, so the cell reference appears in the Number text box.
  4. Press [Tab] and enter mi in the From_Unit text box.
  5. Press [Tab], enter km in the To_Unit text box, and click OK.
  6. Select cell E5 and drag its fill handle down to cell E9 to apply the formula to the other cells.
  7. Select the range E5:E9 and click the Decrease Decimal button on the Formatting toolbar until the values display in tenths of a kilometer.

The CONVERT function also converts units of measurement for mass, pressure, liquid, and many others. For a complete list, along with the unit abbreviations accepted by the function, type CONVERT in Excel’s Help window.

Once you create a worksheet based on our example, you can use the CONVERT function to instantly perform the conversions from miles to kilometers.

EXCEl: 300 Formula Examples

2 Comments

I was teaching my Computer Literacy class and the students wanted me to give examples of different formulas.  Thank goodness for the internet because I found a site that links to over 300 Excel formula examples. This site created by EXCELJET.com allows you to click on a formula for a full description as well as an excel example. Related functions appear to the right and are also clickable. Also click “list of Excel functions” to see the list of functions. You can also search for a function as well. Here is the URL for you to copy and paste in your browser:

https://exceljet.net/formulas

exceljet

 

WORD, EXCEL, PPT: Creating Hyperlinks

Leave a comment

How To Insert Hyperlinks

Hyperlinks add the capability of moving from one position to another quickly and easily, such as linking to another slide, another file, or even to a web site.

  1. Highlight the text or graphics to link
  2. Insert Tab > Links command group > Hyperlink
  3. Choose the target (Place in this document)
  4. Choose the slide

Once a link has been followed, the linked text will change color. You may want to create a “Return” hyperlink.

One advantage of hyperlinking to a separate file is that the size of the presentation file remains smaller than if the file was inserted into the presentation. A disadvantage of linking separate files is that if the name of the linked document changes or if it is moved into a different directory, the link will be broken and the information will not be accessible.

EXCEL: Comparing Two Columns

2 Comments

Did you know that you can use the Go To Special command to help you compare two columns? This command identifies the differences quickly.  Here are the steps:

  1. Select the column you want to find the differences.
  2. Use the Ctrl key to select the original column.
  3. On the Home tab, select Find & Replace, Go To Special, check Row Differences and click Ok.

Compare two columns 1

The items in the difference column will be highlighted for you.

compare two columns 2

Then select the red font color in order for you to see the differences between the column.

compare two columns 3

EXCEL: No Mouse and Ctrl key to Select Noncontiguous Cells

Leave a comment

It was brought to my attention how to select cells that are not next to each without the Control key and the mouse! Michael Castelluccio wrote an article for the Strategic Finance website that explains how to do it.

Most people know how to select multiple ranges in Excel using the Ctrl key and the mouse, but there are other methods that can be more efficient. The obscure technique Add to Selection lets you select many ranges without ever using the mouse. And Go To Special lets you quickly find and select all the cells of a specified type.

 ADD TO SELECTION

No Mouse Needed

Let’s say that you want to apply a Color Scale to the data cells in the figure below. This means you need to select cells B4:D8, G5:I8, and D11:F13. Start by selecting cell B4. To select the first block of data, hold down Ctrl+Shift and press the down arrow (↓) and then the right arrow (→). This common keyboard trick selects all the way down to the bottom and the right edge of the data.

NonContiguous selection 1

After selecting the first cell range, most people would switch to using the mouse. But it’s faster if you can keep your hands on the keyboard. Press Shift+F8. You’ll see the words “Add to Selection” in the status bar at the bottom of the Excel screen.

Move the cell pointer to the next section of data: Ctrl+↓, Ctrl+→, Ctrl+↓, and then ↓. The original range, cells B4:D8, stays selected while you move the cell pointer outside of the range.

To select the second range, hold down Ctrl+Shift and press ↓ then →. You’ve now selected B4:D8 and D11:F14 (see figure below). But now the “Add to Selection” is gone from the status bar. Press Shift+F8 to return to Add to Selection mode.

NonContiguous selection 2

Move the cell pointer to cell G5. Hold down Ctrl+Shift and press ↓ then → to select the third block of cells (see figure below).

NonContiguous selection 3

 

Extended Selection

In Extend Selection mode, any click of the mouse will select from the active cell to the newly clicked cell, obliterating any previous selection. While I’ve never found a good reason to use Extend Selection, there clearly are times when using Shift+F8 for Add to Selection will save time.

I will like to add my advice here as well.  I do not use Extend Selection (F8) because I use the Shift key and the arrow keys to do the same. F8 on my keyboard is dark blue on a black key and I need to use the FN key to make the function keys active. So, since the shift key replaces the left mouse button, I highlight the cells this way.  The mouse is so fast that it highlights more cells that I need.  I am in control of highligting. (Hint: I do the same method in Word).  So, Michael, this is quicker and better for those who have difficulty controlling the mouse and/or who can’t find the F8 in dark blue.

Older Entries