• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

HOW TO INSERT SINGLE / MULTIPLE ROWS ABOVE AND BELOW ROWS

VDS

Member
Dear All,

Thanks for your support for my query to insert rows. But How to INSERT SINGLE / MULTIPLE ROWS ABOVE AND BELOW each data.

1. Apple
2. Rice
3. Wheat
4. Paddy
5. Cardomon
6. Miscellaneous

Pls help.

VDS
 
Hi VDS

I guess the question is how many rows do you want to insert. Assuming the rows you will insert are variable do you want to include that figure in a cell. Don't know as this is only an assumption.

Take care

Smallman
 
Hi Smallman

I specify the query below : -

1. Apple -00 -00 -00
2. Rice- 00 -00 -00
3. Wheat- 00 -00 -00
4. Paddy - 00 -00 -00
5. Cardomon -00 -00 -00
6. Miscellaneous -00 -00 -00
Total -000-000-000

As per the above, one row to be inserted above and below for each data. To be specific, Sr No 2 is Rice then one Row, Sr No 3 Wheat Then one Row. If total no of records is large, each time CTRL AND + to be applied. If the function is applied on cell A1, rows will be inserted above A1. Suggest a command / macro to insert spacing between rows. Value will remain the same. Do hope, question is clear to you.

VDS
 
HAI KANTI,

NICE REPLY. IT WORKS TOO. SUPPOSE I WANT TO INSERT ROWS WITHIN SOME RANGE, SAY A12 : H18, WHAT IS THE OPTION, TOP 3-4 ROWS TO BE AVOIDED FOR COMPANY NAME, NAME OF REPORT, PERIOD, ETC. SPECIMEN FORMAT ATTACHED BELOW.

ABC COMPANY LTD
REPORT OF...........................

REGION A:
1. Apple -00 -00 -00
2. Rice- 00 -00 -00
3. Wheat- 00 -00 -00
4. Paddy - 00 -00 -00
5. Cardomon -00 -00 -00
6. Miscellaneous -00 -00 -00
SUB TOTAL (A) ----------------------------00

REGION B:
1. Apple -00 -00 -00
2. Rice- 00 -00 -00
3. Wheat- 00 -00 -00
4. Paddy - 00 -00 -00
5. Cardomon -00 -00 -00
6. Miscellaneous -00 -00 -00

SUB TOTAL (B) ----------------------------00

GRAND TOTAL (A+B)


VDS
 
Try using the below:

Code:
Sub Row_insert()
Dim Drc As Long
Dim i
Drc = Range("A" & Application.Rows.Count).End(xlUp).Row ' Select your required Data Column
c = Drc
For i = 5 To Drc'change the number to number of rows you want to exclude for the company name - for now I have kept it as 5
    Rows(c).Select
    Selection.Insert xlDown
    c = c - 1
Next i
End Sub
 
Hi VDS,

Can you upload a file that shows the original and the final result you are after as I am not sure as to how you diffenciate between the Regions
 
VDS

Members of the forum will do every thing they can to help, even though they have their lives to live out side of Chandoo, you may need an answer now, but you must realise members have there lives to lead, and shouting at members is bad manners.

NICE REPLY. IT WORKS TOO. SUPPOSE I WANT TO INSERT ROWS WITHIN SOME RANGE, SAY A12 : H18, WHAT IS THE OPTION, TOP 3-4 ROWS TO BE AVOIDED FOR COMPANY NAME, NAME OF REPORT, PERIOD, ETC. SPECIMEN FORMAT ATTACHED BELOW.

You may think that having your Cap Locks on put's over your needs in a more forcible manner........ IT DOES NOT.


Instead of shouting at the forum you may take a few moments to read the link


http://chandoo.org/forum/forums/new-users-please-start-here.14/




.
 
VDS

Members of the forum will do every thing they can to help, even though they have their lives to live out side of Chandoo, you may need an answer now, but you must realise members have there lives to lead, and shouting at members is bad manners.



You may think that having your Cap Locks on put's over your needs in a more forcible manner........ IT DOES NOT.


Instead of shouting at the forum you may take a few moments to read the link


http://chandoo.org/forum/forums/new-users-please-start-here.14/




.
I Extremely sorry. I do respect the value of the forum and not interested to make any negative impression. Due to some server settings, I am unable to load the excel file. Main point I want solution is with regard to job requirement only.

VDS
 
Hi VDS,

Can you please copy/paste just the column with the descriptions, showing what it looks like before and after the rows have been inserted.

kanti
 
The query is solved. Thanks for your valuable support.

This is an often asked question and I am sure that those who have followed this thread and those that may search for a similar answer will be most appreciative of you posting the answer, it will help many.


That is if you have the manners to post it!!!!


Others have helped you but you are unwilling to offer help to others.


.
 
Back
Top