Home  >  Article  >  Software Tutorial  >  How to extract the second, third, fourth... information in Excel

How to extract the second, third, fourth... information in Excel

WBOY
WBOYforward
2024-01-17 11:33:201355browse

How to put the second in excel. three. Four. . . The contents of the column are placed below the first column

Use VBA programming to implement.

ALT F11——F7——Paste the following code and adjust the format:

Sub mysub()

Dim i As Integer

With Sheets(1)

Sheets(1).Select

For i = 2 To Cells(1, 256).End(xlToLeft).Column

Cells(Cells(65536, i).End(xlUp).Row, i).Select

Range(Selection, Cells(1, i)).Select

Selection.Copy

Cells([a65536].End(xlUp).Row 1, 1).Select

ActiveSheet.Paste

Application.CutCopyMode = False

Next i

Columns("A:A").Select

Selection.SpecialCells(xlCellTypeBlanks).Select

Selection.EntireRow.Delete

Cells(1, 1).Select

End With

End Sub

The operation effect is as follows:

How to extract the second, third, fourth... information in Excel

How to extract the second, third, fourth... information in Excel

What should I do if my Excel table does not have the cut, delete, and insert functions?

Sometimes after setting a password for Excel, there will be a series of operations such as Excel being unable to insert, delete, rename, move workbooks, etc. The editor will summarize the solutions here.

1. First, we open the encrypted Excel file

2. Right-click any workbook and you can see that most of the functions above are unavailable. This is the current situation.

3. Now we start to solve this problem. Move the mouse to the top and click the [Review] tab.

4. After clicking [Unprotect Shared Workbook], as shown in the figure, you will be prompted to enter your password (the password here is usually the password when you open Excel), and click Confirm in both steps. Then close the Excel document.

5. Open the Excel document again, and we find that [Unprotect shared workbook] has changed to [Protect and share workbook]. Don’t worry, our work is not over yet.

6. Click [Protect Workbook], and then click [Protect Structure and Window]. A dialog box will pop up, prompting you to enter a password. The password is still the previous password.

7. After confirmation, after finding any workbook, right-click we can see that the functions that were unavailable before can now be used.

Right-clicking an Excel cell does not copy, cut, and set the cell commands

1. As shown in the figure, this is a table with data, which exists in the worksheet named "Gift" below. There are two more worksheets at the back, and there can be countless worksheets by adding more. What we need to do now is to copy this table with data to "sheet2".

How to extract the second, third, fourth... information in Excel

2. Select all of this table as shown in the figure. Not only select the ones with data and content, but also the blank ones. When you see the red circle in the upper left corner, click to select all.

How to extract the second, third, fourth... information in Excel

3. It’s still the small triangle-shaped button in the upper left corner. Right-click the mouse and the options as shown in the picture will appear. Then click Copy.

How to extract the second, third, fourth... information in Excel

4. Click to open the "sheet2" worksheet, and click to select the first cell in the upper left corner. Note that it is not the same as the one selected in the previous step. This is the cell.

How to extract the second, third, fourth... information in Excel

5. Then right-click to paste, so that the worksheet "Gift" and the worksheet "sheet2" both have the same data, and the table in the worksheet "sheet2" is retained as data.

How to extract the second, third, fourth... information in Excel

6. Try it, hide the rows with zero remaining quantity, and select these two rows.

How to extract the second, third, fourth... information in Excel

7. Right-click the mouse and select the hidden option.

How to extract the second, third, fourth... information in Excel

8. In this way, the data in the "Gifts" worksheet can be manipulated and compared with the original data easily, without fear of losing the original data.

How to extract the second, third, fourth... information in Excel

The above is the detailed content of How to extract the second, third, fourth... information in Excel. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:docexcel.net. If there is any infringement, please contact admin@php.cn delete