Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
micky_miha pe Simpatie.ro
Femeie
23 ani
Bucuresti
cauta Barbat
23 - 43 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] Insert multiple rows (a specific number) Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TonyTzu
Moderator

Inregistrat: acum 12 ani
Postari: 252
Source:

1. Navigate to the ‘View’ Tab on the top ribbon (or the Developer tab if there is one), click on the ‘Macros’ button.
2. Now type the name for the macro say “Insert_Lines” (without quotes) and hit the create button.
3. Next, a VBA editor will be opened, simply paste the below macro code after the first line.

Dim CurrentSheet As Object 
' Loop through all selected sheets. 
For Each CurrentSheet In ActiveWindow.SelectedSheets 
' Insert 5 rows at top of each sheet. 
CurrentSheet.Range("A20:A69").EntireRow.Insert 
Next CurrentSheet

Now comes the important thing, in the above macro the range is (“A20:A69”). The first parameter i.e. A20 tells the position from where you wish to insert the rows and the second parameter .i.e. A69 is the number of rows to be inserted added with the start position and subtracted by 1 (for instance: If you want to insert 50 rows starting from A20 then second parameter of range should be (50+20-1), so the range will be (“A20:A69”))

After adding the code you can press the “F5” key and the code will insert the required rows.


pus acum 8 ani
   
Pagini: 1  

Mergi la