locked
How to add first Blank row in existing excel RRS feed

  • Question

  • Hi Team,

    How to add first blank row in existing excel using Vbscript or VBA 

    Advance thanks!!

    • Moved by Alex-KSGZ Friday, January 18, 2019 9:21 AM
    Tuesday, January 15, 2019 9:06 AM

All replies

  • Hi,

    According to your description, your issue is more related about Vbscript or VBA. And this forum is discussing and asking questions about the vb.net.

    try the vba code,insert Blank Rows Between Existing Rows

    Sub InsertBlankRows()
        Dim MyRange As Range
        Dim iCounter As Long
        Set MyRange = Range("A2:C8")
        For iCounter = MyRange.Rows.Count To 2 Step -1
        MyRange.Rows(iCounter).EntireRow.Insert
        Next iCounter
    End Sub

    If this doesn't solve your problem,ask in the following forum:

    Vbscript

    VBA

    Best Regards,

    Alex



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 15, 2019 9:23 AM
  • This is not working in my existing excel 

    My excel path : C:\Users\Sam\Desktop\New folder\ Award.xlsx

    My question i add first row is blank in existing excel, first blank row in excel  than start data in second row 



    Tuesday, January 15, 2019 9:55 AM
  • Hi,

    I'm afraid your description is insufficient. I guess what you want to do is the below.
      1. Specify the folder where Excel files (*.xls, *.xlsx) exit. 
      2. Insert one blank row at row 1 in each Excel file

    Is this correc?

    Regards,


    Ashidacchi -- http://hokusosha.com/

    Wednesday, January 16, 2019 1:56 AM
  • Yes Correct
    Wednesday, January 16, 2019 3:24 AM
  • Hi,

    I've made a sample and shared it via OneDrive.


    1. Download "InsertRow.xlsm".
    2. Input a folder name with full path in cell [A2]: where Excel files exist in that folder.
    3. Press [Insert Blank Row] button in "InsertRow.xlsm".

    Regards,

    Ashidacchi -- http://hokusosha.com/


    • Edited by Ashidacchi Wednesday, January 16, 2019 6:38 AM
    Wednesday, January 16, 2019 6:37 AM
  • Hi SantoshBhandari5712,

    How is going with your issue?
    If you downloaded "InsertRow.xlsm" (my previous post) and it was helpful, please mark as an answer. That will be helpful for those who have same issue.

    Regards,

    Ashidacchi -- http://hokusosha.com/

    Monday, January 21, 2019 12:26 PM