Home > Common Problem > body text

How to convert text data into numerical values

zbt
Release: 2023-08-21 16:53:04
Original
14965 people have browsed it

The methods for converting text data into numerical values ​​include direct conversion in smart prompts, clipboard conversion, clipboard conversion, column method and function formula method. Detailed introduction: 1. Direct conversion in the smart prompt, directly select the text data, click the smart logo with the exclamation mark in the upper right corner, and select "Convert to Number"; 2. Clipboard conversion, select the text data area - copy - Open the clipboard - paste all; 3. Paste special method, select any blank cell - copy - select the text data area - paste special - check the operation "Add" - OK; 4. Column method wait.

How to convert text data into numerical values

We often need to export data from some databases or systems into tables. At this time, you will find that some data have cells on the corners. When some green triangles appear, you will also find that the data with these green triangles cannot be calculated such as cumulative sum, and even the powerful Vlookup cannot do anything with them.

Yes, these data with green triangles are text data. Compared with numerical data, before we perform post-statistical processing of table data, we need to Convert them. Today, the leader will give you some tips on how to convert text data into numerical data.

1. Direct conversion in the smart prompt

Directly select the text data, click the smart logo with the exclamation mark in the upper right corner, and select "Convert to Number".

2. Clipboard conversion

Select the text data area-copy-open the clipboard-paste all

3. Paste Special Method

Select any blank cell—Copy—Select the text data area—Paste Special— Check the operation "Add" - OK

4. Column method

Select the text data area-[Data] option Card - Sort into columns - Step 1: Separator - Step 2: Tab key - Step 3: General - Complete

5. Function formula method

You can create an auxiliary column first, enter the formula =A2*1 in B2, and fill it down to convert it into numerical data (you can also enter the formula =A2/1, =A2-0 here) Or =A2 0, the principle is not to change the value)

Finally, we can also try to enter the function formula in B2: =value(A2)

The above is the detailed content of How to convert text data into numerical values. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template