Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Engineering Calculations.

# Engineering Calculations by Allen Wyatt
(last updated October 10, 2020)

In an engineering environment, it is not unusual to need to "normalize" numbers in some manner. For instance, you may need to show numeric values normalized to multiples of 10^3, such that 7340 is expressed as 7.34 and 73400 is expressed as 73.4.

It is possible in Excel to use a custom number format to express information in scientific notation that will normalize the display of a number to a multiple of 10^3. To do this, you would follow these steps:

1. Select the cells you want formatted.
2. Choose the Cells option from the Format menu. Excel displays the Format Cells dialog box.
3. Make sure the Number tab is selected.
4. In the list of format categories, choose Custom. (See Figure 1.)
5. Figure 1. The Number tab of the Format Cells dialog box.

6. In the Type box, enter ##0.0E+0 as your format. (This provides only one number to the right of the decimal place. If you want more, increase the number of zeros after the decimal place.)
7. Click on OK.

Now, when you enter a number such as 7340 into the cell, Excel displays it as 7.3E+3. Because of the way the cell format was entered, the portion after the E will always be a multiple of 3.

This is fine and good, but what if you want just the 7.3 in the cell, and then a metric prefix with a unit in an adjoining cell, such as kilograms? This is a bit more complex, but it can be done using formulas. For instance, let's assume you have your original number in cell A2, you wanted the normalized number in cell B2, and the metic prefix and unit name in cell C2. All you would need to do is enter the following formula in cell B2:

```=IF(OR(A2>=1,A2<=-1),SIGN(A2)*(ABS(A2)/(10^(3*INT(LOG(ABS(A2))/3)))),
IF(A2=0,0,SIGN(A2)*(ABS(A2)*10^(-3*INT(LOG(ABS(A2))/3)))))
```

Assuming the units you are working with are an imaginary unit called a foo, in cell C2 you would use a different formula, as follows:

```=IF(OR(A2>=1, A2<=-1),CHOOSE(INT(LOG(ABS(A2))/3)+1, "Foos", "Kilofoos",
"Megafoos", "Gigafoos", "Terafoos", "Petafoos", "Exafoos"),
IF(A2=0,"",CHOOSE(INT(-LOG(ABS(A2))/3)+1, "Millifoos", "Microfoos",
"Nanofoos", "Picofoos", "Femtofoos", "Attofoos")))
```

These formulas may seem a bit long, and they are. However, they will work for any number between approximately -9.99999E-18 to 9.99999E+20. For instance, if you put the number .000125 in cell A2, then cell B2 will contain 125 and cell C2 would contain Millifoos.

If you prefer to not use longer formulas such as these in your workbooks, you can develop a couple of VBA functions to do the trick. The following function, MySciNum, returns a normalized number. Thus, you would use =MySciNum(A2) in cell B2 to get the same results as noted above:

```Function MySciNum(BaseNum As Double) As Double
Select Case BaseNum
Case Is >= 1
While Abs(BaseNum) > 1000
BaseNum = BaseNum / 1000
Wend
Case 0
'Do nothing
Case Else
While Abs(BaseNum) < 1
BaseNum = BaseNum * 1000
Wend
End Select
MySciNum = BaseNum
End Function
```

This function only returns a number. To return the units with the appropriate metric prefix, you would use the following function. All you need to do is pass it the cell reference and the name of a single unit. For instance, you could use =MySciPre(A2, "foo"). The macro is as follows:

```Function MySciPre(BaseNum As Double, Unit As String) As String
Dim OrigNum As Double
Dim Pref As Integer
Dim Temp As String

Pref = 0
OrigNum = BaseNum
Select Case BaseNum
Case Is >= 1
While Abs(BaseNum) > 1000
BaseNum = BaseNum / 1000
Pref = Pref + 1
Wend
Case 0
Pref = 99
Case Else
While Abs(BaseNum) < 1
BaseNum = BaseNum * 1000
Pref = Pref - 1
Wend
End Select

Select Case Pref
Case -6
Temp = "atto" & Unit
Case -5
Temp = "femto" & Unit
Case -4
Temp = "pico" & Unit
Case -3
Temp = "nano" & Unit
Case -2
Temp = "micro" & Unit
Case -1
Temp = "milli" & Unit
Case 0
Temp = Unit
Case 1
Temp = "kilo" & Unit
Case 2
Temp = "mega" & Unit
Case 3
Temp = "giga" & Unit
Case 4
Temp = "tera" & Unit
Case 5
Temp = "peta" & Unit
Case 6
Temp = "exa" & Unit
Case Else
Temp = ""
End Select

If Len(Temp) > 0 Then
Temp = LCase(Temp)
Temp = UCase(Left(Temp, 1)) & Mid(Temp, 2)
If Abs(OrigNum) <> 1 Then Temp = Temp & "s"
End If

MySciPre = Temp
End Function
```

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2928) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Engineering Calculations.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Displaying Shortcut Keys in ScreenTips

ScreenTips can appear with or without shortcut keys displayed in them. Here's how to control whether they appear or not.

Discover More

Editing a Document with Many Pages

Working with large or long documents in Word can present some interesting challenges. The most common challenge is that ...

Discover More

Changing the Height of Worksheet Tabs

Do you need your worksheet tabs to be taller than what they are? You can't make the adjustment in Excel, but you can make ...

Discover More Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

Determining an ANSI Value in a Macro

Need to know the character code used for a particular character? In a macro you can use the Asc function to determine the ...

Discover More

Creating a Photo Catalog from a Folder of Photos

Excel is great for collecting all sorts of information. You might even use it to create a catalog of your photos. Working ...

Discover More

Working while a Macro is Running

If you have a macro that takes a long time to process a workbook, you might want to continue working in Excel while the ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is five minus 3?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)

##### This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8555628,"math_prob":0.81386864,"size":5689,"snap":"2022-05-2022-21","text_gpt3_token_len":1542,"char_repetition_ratio":0.12875989,"word_repetition_ratio":0.07467205,"special_character_ratio":0.2859905,"punctuation_ratio":0.12413793,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97520274,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,null,null,null,null,7,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-18T20:07:23Z\",\"WARC-Record-ID\":\"<urn:uuid:5d92d61b-c66f-49ac-ae71-499504464ec6>\",\"Content-Length\":\"48477\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:7f672ea1-9dff-4aa3-9c3c-877e1ebbcb3c>\",\"WARC-Concurrent-To\":\"<urn:uuid:a7379c93-95eb-4380-8053-9a4d53ddd646>\",\"WARC-IP-Address\":\"50.28.58.201\",\"WARC-Target-URI\":\"https://excel.tips.net/T002928_Engineering_Calculations.html\",\"WARC-Payload-Digest\":\"sha1:TEJ4LDWNKUCNYQ4AK4HVLP3DBDRSQ4PC\",\"WARC-Block-Digest\":\"sha1:CZR24SOAWRXWXUK4SW5XHG3ASAXMCG7J\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662522309.14_warc_CC-MAIN-20220518183254-20220518213254-00612.warc.gz\"}"}