How Excel implements the previous line of line wrapping to the last line of numbers

Source: Internet
Author: User

How Excel implements line wrapping. The previous line becomes the number on the last line?

Look at the picture. It's not professional to say it's not clear. It's like, for example, to E, to 50.

Give A1 the input number each time. B1 becomes A1 's,,, C1 becomes b1...e1 and becomes C1. To the end of E1 ...

Anyway, just give A1 input. The following is the number in the previous line.

Question added: Give A1 the input number each time. B1 becomes A1 's,,, C1 becomes B1 ... E1 becomes C1 ... A2 into a E1 number. As long as the front A1 has input. Just push backwards. Just 5 columns. Can enter 5 columns on the line. All the rows are fine.

Write a piece of code that copies the code to the list of functions you want to implement:

Private Sub Worksheet_selectionchange (ByVal Target as Range)

Dim I as Integer

For i = 3 to Range ("A2"). Value

If Range ("a" & i). Value <> "" Then

Range ("A" & i). Insert Shift:=xltoright

End If

Next

End Sub

This code starts with the third line, and you can enter the last line of rows you want to implement in the A2 cell, like 10, see the figure below

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.