Open In App

Custom Format to Show Units Without Changing Number to Text in Excel

Last Updated: 21 Mar, 2022

S

Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

Microsoft Excel is a great software that is used by individuals to store data in the form of spreadsheets in a formatted manner. Microsoft Excel allows us to store a variety of data such as characters, text, numbers, decimals, date, time, etc. Since Excel is a smart tool, it automatically identifies the data type of the records and places them accordingly inside the cell based on its default convention. But, there can be scenarios in which we want to store data which is actually of kind number but along with some unit which is generally text. Let’s say we want to store unit values like 10 Litres (10 L), 20 Litres (20 L) or we want to store distance traveled like 2 km, 5 km. In such cases, when we input let’s say 2 km or 20 L inside a cell then it will be treated as a text by Excel automatically. But, what if we want these records to be actually stored as numbers inside the cell, so that we can perform some functional operations on these numbers such as calculating the total amount of currency or calculating the total distance traveled. In such cases, mathematical formulas cannot be performed on text values. Hence, we are required to change those texts back to numbers. In this article, we are going to read about the procedure using which we can show units associated with a number without actually converting those numbers back to text.

Microsoft Excel allows its users to use custom format options using which they can write numbers along with text and still those cells should be treated as numbers.

Step 1: Select the desired cells in which we want to apply the custom formatting.

Select-the-desired-cells

Step 2: In the topmost Excel ribbon, click on the Home tab and select the Number Format drop-down menu.

Select-the-Number-Format-drop-down-menu

Step 3: In the drop-down list, select the More Number Format option to open the Format Cells dialog box.

Open-the-Format-Cells-dialog-box

Step 4: In the Format Cells dialog box, on the left-hand side from the Category column select the Custom option.

Select-the-Custom-option

Step 5: From the built-in templates, select a matching number format code and then in the Type box inside double quotation marks (“”) write your desired unit, let’s say “Km.”.

Select-a-matching-number-format-code

Step 6: We can visualize what our data will look like after applying that formatting using the Sample tab.

Applying-formatting

Step 7: After getting satisfied with the result we can click on the OK button to apply that formatting to all the desired cells.

Final-output

Note: After selecting the desired cells, a user can directly open the Format Cells dialog box by using the “Ctrl + 1″ shortcut key on the keyboard in Windows OS or the “command + 1” shortcut key on macOS depending upon their operating system in which they are using Microsoft Excel. 

After applying custom formatting, we can even verify that our records are treated as numbers or not by applying any mathematical function like SUM() or AVERAGE(), these functions should be able to return the proper result which successfully demonstrates that our data records are still treated as numbers even after adding text to them.



S

News
Improve
Discuss
Do you want to advertise with us?Click here to know more

S

Custom Excel Number Format

article_img
MS Excel is a very important tool for businesses as well as for individuals with very useful features and tools. It is a market leader in spreadsheet editing and managing software. MS Excel contains many inbuilt number formats that can be used as per the needs of the user, however, sometimes users may need specific custom number formats that are not available in Excel by default. Custom Excel Number Format For example, if we want to round a decimal number to one digit after the decimal point, if we consider the number 44.64 we can use the custom number format ##.# to convert it to 44.6. If you want to represent number 347523450 using the Indian number system, of crores, lakhs, and thousands you can use the custom number format ##\,##\,##\,### to convert it to 34,75,23,450. First, let's consider the list of the following numbers given below : To Convert these numbers into our required format we have to execute the following steps: Step 1: Drag and select the numbers whose format has to be changed using the cursor. Step 2: a) Go to home and click on format. b) Then click on Format Cells. Or a) Right-Click and choose Format Cells. Format Cells Dialog Box appears. Step 3:
Read More

How to Create a Custom Date Format in Excel?

article_img
Date formatting is very important when you prepare any set of data, then there are different types of formatting used for different categories, which are different from our normal formatting which is dd/mm/yyyy. When you enter any date in MS-Excel then excel considers it as the default format of date as your computer has, but you can change their format in numerous ways, and also you can make your own custom format of a date. Such as 14-Dec, December 14, 2023, 14/12/2023, and may more depending on individual choices, you can change it. Here we are going to show the different ways to format a Date. Let's understand it in a better way by taking an example, Step 1: Open MS Excel and save with any name. Here we are going to save it by "Date Format" name. Step 2: Take any date, like here we are taking 15/04/2001, which is in the format of mm-dd-yyyy and also it is the normal format of a date. Step 3: You can change the format by selecting that particular date cell, and press ctrl+1, then a new "format cells" window will open. From this format window, you can choose date formatting according to your needs. If you want that date to be on 15 April 2001 format, then choose dd mont
Read More

How To Convert Date To Number String Or Text Format In Excel?

article_img
Excel's built-in date system by default supports dates between January 1, 1900, and December 31, 9999. In this range, the numbers start at 1 and increase by 1 each time. In addition to text and numeric data types, Excel also allows dates that are internally stored as serial numbers. In Excel, the date format is typically recognized by default. However, Excel also allows you to input date format by choosing the cell and pressing (Ctrl+;). Methods to Convert Date to Number StringDATEVALUE Function Syntax: =DATEVALUE (date_text) Where date_text is the only argument DATEVALUE FunctionCell FormattingStep 1: Once the cell with the value has been chosen, click the home tab and choose the NUMBER or TEXT option. Step 2: The cell format then changes into the original serial number internally stored by Excel. Note: The first serial number stored by excel is of date 01/01/1900. Methods to Convert Date to TextTEXT Function It is used to convert a date into a specified text format. Syntax: =TEXT(value, format_text) For today’s date: =TEXT(TODAY(), format_text) Where value: The value that needs to be converted. This could be a numeric cell reference or value, or a numeric value returned by
Read More

How to Correctly Sum Numbers With Units in a Range in Excel?

article_img
In Excel, we can sum numbers in a range which are given along with their units. When we place numbers along with their units inside Excel then they are treated as text by Excel implicitly in the backend. Now, the problem that arises here is we cannot directly apply any mathematical function like the in-built SUM() function over texts to get their sum because the SUM() will always return us a value 0. We can observe from the image given above, when we use the =SUM(B2:B6), to sum text values then we get the result as 0. From this we now have an understanding that to add numbers using the SUM() function, we need to have numerical values i.e., the number data type for each element in the cell range. To convert these texts back to numbers we need to perform two steps: Step 1: Remove the units (here, km) from the elements. It can be done using the SUBSTITUTE() function in Microsoft Excel. The SUBSTITUTE() function in Excel is used to substitute specific values inside a text string with a new value. The syntax for the SUBSTITUTE() function is given as: =SUBSTITUTE(original_text, old_text, new_text, [instance_num]) where original_text is the element/record value, it is a required parameter
Read More

How to Show Formulas in Excel

article_img
Exploring the art of Excel formulas can turn up your data analysis and reporting capabilities. Whether you’re a financial analyst, digital marketer, or an Excel learner, understanding how to display formulas in Excel is important. This article will make you learn the simple steps to show the formulas of your Excel spreadsheets, enhancing your efficiency and proficiency. By learning how to show formulas in Excel, you’ll learn to ensure accuracy and transparency in your calculations. How to Show Formulas in ExcelHow to Show Formulas in MS Excel When you enter a formula in a cell and press the Enter key, Excel immediately displays the calculated result. To check all the formulas in the cell, follow one of the methods provided below for your reference, Show the Formulas Option on the Excel RibbonThe Ribbon: Head over to the Formulas tab, find the Formula Auditing section, and hit the Show Formulas button. Your formulas will step into the spotlight, replacing the results on stage. To get the calculated values back, click the Show Formulas button again to toggle it off. Go to Formulas Tab>> Select Show formulas Show Formulas in cells instead of their results in Excel optionsIn Exce
Read More

How to Show Percentage in Pie Chart in Excel?

article_img
Pie charts are mostly used as it is more appealing and easy to understand for any type of audience. It is divided into various parts and each part of pie charts denotes a subcategory of the original data set. This sub-category data is sometimes shown using the original values or sometimes using percentages as each subcategory represents the proportion of data. In this article, we are going to see how to show percentages in a pie chart using Excel. Consider the example shown below : Example: Consider the data set which consists of information about the number of students enrolled in our courses. The steps are as follows : Insert the data set in the form of a table as shown above in the cells of the Excel sheet.Select the data set and go to the Insert tab at the top of the Excel window.Now, select Insert Doughnut or Pie chart. A drop-down will appear.Select a 2-D pie chart from the drop-down. A pie chart will be built. Select -> Insert -> Doughnut or Pie Chart -> 2-D PieInitially, the pie chart will not have any data labels in it. To add data labels, select the chart and then click on the "+" button in the top right corner of the pie chart and check the Data Labels button.
Read More

How to Show Percentages in Stacked Column Chart in Excel?

article_img
In this article, you will learn how to create a stacked column chart in excel. Show percentages instead of actual data values on chart data labels. By default, the data labels are shown in the form of chart data Value (Image 1). But very often user needs to plot charts with actual data and show percentages/custom values on the chart instead of default data. For that we have an option “Value From Cells” in chart “Format Data Label” (Image 2) to select a custom range. Image 1Image 2Implementation: Follow the below steps to show percentages in stacked column chart In Excel: Step 1: Open excel and create a data table as below Step 2: Select the entire data table. Step 3: To create a column chart in excel for your data table. Go to “Insert” >> “Column or Bar Chart” >> Select Stacked Column Chart Step 4: Add Data labels to the chart. Goto “Chart Design” >> “Add Chart Element” >> “Data Labels” >> “Center”. You can see all your chart data are in Columns stacked bar. Step 5: Steps to add percentages/custom values in Chart. Create a percentage table for your chart data. Copy header text in cells “b1 to E1” to cells “G1 to J1”. Insert below formula in
Read More

How to Insert or Show Power View in Excel?

article_img
Power View is one of the features of excel, which enables us to visualize, explore and present large data sets and encourage ad-hoc reporting. The larger data sets can be easily visualized and analyzed in excel using the Power View and this data visualization is dynamic which helps to present the data within a single power view ad-hoc report. Ad-hoc, a Latin word used for "to this", is also understood to be "as needed" or "as required". When the reports are created on request it is termed ad-hoc reporting. Steps to Insert Or Showing Power View Let's see how we can insert the power view in our excel document. Step 1: Adding Power View. By default, Power View is not added to the excel ribbon (tools tab). In order to add it, we need to customize our ribbon. For this, we can use any tab(here, in this example we are using data-tab) Right-Click > Customize the Ribbon. Once we click on the Customize the Ribbon option, excel will open a popup window where we are required to set the Power View option. As we can see, we do not have a Power View option in our Data menu. Step 2: Creating A New Group. In this step, we will create a new group for our Power View option. For this Select Da
Read More

How to Unhide and Show Hidden Columns in Excel: Step by Step Guide

article_img
How to Unhide all Columns in Excel- Quick StepsOpen MS Excel >> Select the Entire WorksheetRight-click on Column Headers >> Select "Unhide"Columns VisibleUnhiding columns in Excel is a simple but essential task when working with hidden data. Whether to make a worksheet look cleaner or accidentally disappeared, knowing how to unhide them ensures all your information is accessible and organized. This guide will walk you through step-by-step methods to unhide columns in Excel, helping you efficiently manage and analyze your data.Table of ContentWhy Do Columns Get Hidden in ExcelHow to Unhide All Columns In Excel (Windows and Mac)How to Unhide All Columns in Excel Using the Format ToolHow to Unhide All Columns by Setting the Column WidthHow to Unhide Columns in Excel Using Keyboard ShortcutHow to Unhide all Columns Automatically with VBA MacroHow to Show All Hidden Columns in ExcelHow to Check the Number of Hidden Columns in a WorkbookAlternative Method to check the Hidden Column in Excel Why Do Columns Get Hidden in ExcelColumns may be hidden intentionally to:Simplify data presentation.Protect confidential information.Organize large datasets.Columns may also appear hidden
Read More

Use Custom Data Validation Function To Limit Number of Digits In Excel

article_img
There might arise a situation while working on Excel where you want the users to type in 10-digits(say) numbers only in a cell. In these types of scenarios, we can make use of the Custom Data validation Function to limit the number of digits in Excel. In this article, we will discuss the same. Sample Data: Customer Sales Table Sales Table Approach: First, we check the given cell value is number and then the cell value is only 10 digit. Allow only both conditions are true Excel Formula: ISNUMBER(): Return Boolean value True if the cell value is number.LEN(): Return the number of characters in a cell.AND(): Logical and function.Implementation of Custom Data Validation Function: Follow the below steps to implement the custom data validation function: Step 1: Type Header (“Mobile Number” as an example) in Cell C1. Step 2: Select cells “C2” to “C21” Step 3: Click Data >> Data Validation >> Data Validation… to open the Data Validation dialog box as shown below. Here we will be implementing the function as : AND(LEN(C2)=10,ISNUMBER(C2))Error Alert: Data validation popup an Error Alert, when the condition is not met.
Read More
three90RightbarBannerImg