Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 561277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:25:59+00:00 2026-05-13T12:25:59+00:00

I have excel sheet with N+1 rows where Column A has unique id N.

  • 0

I have excel sheet with N+1 rows where Column A has unique id N.

I need to duplicate each row so that below a row N there will be three new rows with unique-ids N-b, N-c, N-d

e.g. sample input rows:

id1    data here 
id2    data2 here 

e.g. sample output:

id1    data here 
id1-b  data here 
id1-c data here
id1-d data here
id2    data2 here 
id2-b  data2 here 
id2-c data2 here
id2-d data2 here
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:25:59+00:00Added an answer on May 13, 2026 at 12:25 pm

    You could try something like this

    Sub Macro1()
    Dim sheet As Worksheet
    Dim usedRange As Range
    
        Set sheet = ActiveSheet
        Set usedRange = sheet.usedRange
    
    Dim i As Integer
    
        For i = 1 To usedRange.Rows.Count
            Dim row As Range
            Set row = usedRange.Rows(((i - 1) * 4) + 1)
    
            Dim iCopy As Integer
    
            For iCopy = 1 To 3
                row.Copy
                Dim insertRow As Range
                Set insertRow = usedRange.Rows(((i - 1) * 4) + 1 + iCopy)
                insertRow.insert xlDown
                Dim copiedRow As Range
                Set copiedRow = usedRange.Rows(((i - 1) * 4) + 1 + iCopy)
                copiedRow.Cells(1, 1) = copiedRow.Cells(1, 1) & "-" & Chr(97 + iCopy)
    
            Next iCopy
        Next i
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an excel sheet full of times. They are formatted so that they
I have a DataSet populated from Excel Sheet. I wanted to use SQLBulk Copy
I've created an excel sheet with Delphi 6. Now I have to add a
Every time I create a new excel sheet, I have to go in and
I'll have an ASP.net page that creates some Excel Sheets and sends them to
I have Excel add-in which I add so many class modules that it is
We have an Excel 2002/XP based application that interacts with SQL 2000/5 to process
I have an excel spreadsheet in a format similar to the following... | NAME
I have an Excel Spreadsheet like this id | data for id | more
I have an Excel application in which I want to present the user with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.