Excel constructs a regular data instance 1,1.1,2,2.1,3,3.1

Source: Internet
Author: User

For example, the effect we're going to do is this:

A2 for: 1

A3 for: 1.1

A4 for: 2

A5 for: 2.1

A6 for: 3

A7 for: 3.1

......

How can data like this be constructed?

First, we analyze and find the rule: The number is an integer, the second number is the first number plus 0.1, the second number is an integer, but the integer is the previous integer plus 1, then the integer plus 0.1 ...

When we use the formula, we start using it from A3, A2 enter a 1 directly.

So, how do you use formulas when you start using formulas for padding from A3?

First, the theoretical guidance

To determine if the last number is a decimal, if so, then use the integer portion of the previous number plus 1; If the previous number does not contain decimals, then use the integer portion of the previous number plus 0.1;

Second, the realization of the formula

The complete formula in A3 is:

=if (A2-int (A2) >0,int (A2) +1,a2+0.1)

The other pull down, the regular data came out.

Here's an analysis of the formula:

=if (A2 is a small points, yes, then take A2 add 1, if not, take A2 plus 0.1)

Int (A2) to get the integer part of the A2, discard decimals;

A2-int (A2) >0,a2 subtracts the integer portion of the A2, and if >0, indicates that the A2 is a number with a decimal point.

Int (A2) +1,a2 takes an integer plus 1.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.