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 903295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:51:12+00:00 2026-05-15T15:51:12+00:00

I have an excell fill with these data in it : Name1 1 2

  • 0

I have an excell fill with these data in it :

Name1
1
2
3
Name2
1
2
3
4
Name3
1
2
......

I want to have Names in a cell in front of each row below it like this :

1          Name1
2          Name1
3          Name1
1          Name2
2          Name2
3          Name2
4          Name2
1          Name3
2          Name3
....

is there any way to do this?

  • 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-15T15:51:13+00:00Added an answer on May 15, 2026 at 3:51 pm

    Here is one way you could approach this problem; it makes some assumptions that you may have to address if they turn out to be false.

    Dim n As String
    Dim v As String
    
    Dim row As Long
    Dim col As Integer
    
    Dim c As Range
    
    Dim destRow As Long
    Dim destCol As Integer
    
    'Assume your data is in column A, starting in row 1
    row = 1
    col = 1
    
    'and that you want to drop it into columns C and D starting in row 1
    destRow = 1
    destCol = 3
    
    Do
        Set c = ActiveSheet.Cells(row, col)
        If Left(c.Value, 4) = "Name" Then
            n = c.Value
        ElseIf n <> "" Then
            Cells(destRow, destCol).Value = c.Value
            Cells(destRow, destCol + 1).Value = n
            destRow = destRow + 1
        End If
        row = row + 1
    Loop Until ActiveSheet.Cells(row, col).Value = ""
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got some excel sheet and want to fill fields automaticly with data.
I have 12 excel files, each one with lots of data organized in 2
I have a form that users are able to fill in and want to
I have an excel sheet similar to : I want to read data columns
I have an excel workbook which needs to query data from an HTTP server.
I'm new to c#.net I have excel sheet and I want to import into
I have an Excel 2003 worksheet with protection enabled being used for data entry
I'm wondering if there is any tool/library that would fill Java objects with data
I have two Excel sheets of climate data: temperature (dtT) and relative humidity (dtR).
I want to fill in a spreadsheet that is directly linked to a C#

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.