In the previous article "Sharing practical Excel skills: batch creation/splitting of worksheets, batch renaming of worksheets", we learned two methods of setting up worksheets. Today we are going to learn the "custom format" function. After learning the custom format, we can deal with many problems without using functions.
In the default cell format of EXCEL software, it is usually a numerical value, date or text, etc. So is there any way to make the characters in the cell display in the format we want? Today I will introduce to you a very useful function: custom format.
1. How to open custom format
Select any cell, click the "Home" tab, and click on the right side of "Number Group" There is an extension button in the lower corner. Click to bring up the "Format Cells" dialog box.
You can also directly press the shortcut key Ctrl 1 to bring up the dialog box shown below. Click "Number" - "Custom". Under "Type" on the right is where we need to fill in the custom format code. After clicking OK, the characters in the cell will be displayed as we want.
2. Introduction to basic custom functions
The custom format code is divided into four areas Sections are separated by half-width semicolons (;). The code of each section acts on different types of values:
Positive number display format; Negative number display format; Zero value display format; text display format
In addition, it is also very simple to use custom formats to display colors for characters. Just add [red] and other words to the custom code. Characters display corresponding colors. The colors can display the following: [Black], [Green], [White], [Blue], [Magenta], [Yellow], [Teal], [Red].
3. Main application scenarios of custom formats
3.1 The percentage increase is shown
in As shown in the table below, the positive and negative numbers in the last column of data are marked with different colors, and the up and down arrows represent the positive and negative signs.
The custom format code is:
[Red]↑0%;[Green]↓0%;0%;
Analysis: There are four areas separated by semicolons. The first area represents the positive area and displays red; the second area represents the negative area and displays green. 0 is a numerical placeholder. , displays the value itself, followed by % to display the percentage; the third area is the zero value display format, and the color defaults to black; the last area is text, and if there is no text in the table, fill in nothing.
3.2 Add text display
In the table shown below, I want to set the number in the first column to the display format of the second column.
Usually everyone uses the text connector & to connect text. Here we directly use the custom format code to set it to: Part 0
Analysis: 0 represents a placeholder for a number, just add text before and after.
As shown below, if the numbers in the first column are Chinese numbers, they need to be set to be displayed in the format of the second column.
Then the custom format is set to: Part @
Analysis: @ represents the occupancy of the text Character.
3.3 Numbers are displayed in Chinese
If we need to display the numbers in column 1 as shown below in the Chinese style of columns 2 and 3, generally Chinese will be entered directly when typing. Of course, custom formats can also help you realize this function very conveniently.
Chinese lowercase custom format code is set to: [DBNUM1]
Chinese uppercase custom format code is set to: [DBNUM2]
3.4 Segmented display of numbers
At work, we also need to display values of different lengths in segments, as shown below:
The custom format code for segmented display is set to:
0000 0000 0000
Analysis: Use 0 as a placeholder and add a space to display in segments.
The custom format code without adding 0 in front of the segmented display is set to:
??00 0000 0000
Analysis: If we don’t want 0 is automatically added to the front of the value, and if you want the value to be displayed in alignment, you can use ? to replace the 0 displayed previously, here? The number of depends on the maximum number of previously displayed 0s.
However, since EXCEL can fully display numbers within 11 digits; the number of numerical digits is greater than 11 digits but not more than 15 digits. EXCEL displays scientific notation as 9.03525E 13. You can use the above automatic Define the format code so that it is fully displayed; numbers over 15 will be displayed as 0, so the method used here does not work for values over 15 digits. For values exceeding 15 digits, we can only modify the format to text to display them all.
3.5 Date and time display
In the table shown below, the date and time in the first column need to be displayed in the format of the second column.
The custom format code settings in the table above are:
The first one: [DBNum1]yyyy"year"m"month"d"day " aaaa
The second one: d/mmm/yy,dddd
The third one: Today is aaaa
The fourth one: morning/afternoon h"point"m "minutes"s"seconds"
The fifth one:h:m:s am/pm
The sixth one:[m]minutes s seconds
Analysis: This The English letters inside are the English initials of year, month, day, hour, minute and second. The number of letters determines the number of characters in the display format.
In the date format, yy represents 18, while yyyy represents 2018; m and mm represent the months 7 and 07 displayed in numerical values, and mmm and mmmm represent the months Jul (abbreviation) and July (full name) displayed in English. ); In the same way, d and dd represent the dates 8 and 08 displayed in numerical values, and ddd and dddd represent the days of the week Sun (abbreviation) and Sunday (full name) displayed in English.
In the time format, if m needs to represent minutes, it needs to be displayed together with h hours, or [ ] is added to represent the number of minutes accumulated from zero o'clock on the day to the present, which means that hours are also converted into minutes.
If you need to express the day of the week in Chinese, you need to use the letter a. Aaaa displays Sunday, and aaa displays only the day.
4. Issues to note
It should be noted that custom formatting does not change the format of the cell itself, only changes it display mode.
In the table shown below, the uppercase Chinese numbers in column C are converted from the custom format code set by the numbers in column A. Let’s try to see if the Chinese numbers in column C can be summed?
Enter the formula in column D:
SUM($C$30:C30)
. Double-click to fill it down. You can see the cumulative summation results as follows.
It can be concluded that although the cells in column C are displayed in Chinese capitals, they are actually numerical values and can be used for mathematical operations.
Of course, if we need to convert the custom format into an actual numerical format, we can use the clipboard to copy, and then copy the data in the clipboard to the cell.
#Or copy it into a word or txt document and then paste it back into the cell to complete the format conversion.
Okay, that’s all the introduction to EXCEL’s custom formats
Related learning recommendations: excel tutorial
The above is the detailed content of Practical Excel Tips Sharing: The Magical 'Custom Format” Function. For more information, please follow other related articles on the PHP Chinese website!

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver Mac version
Visual web development tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software