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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:38:50+00:00 2026-05-25T20:38:50+00:00

I have exported excel table like that but i need another format like that:

  • 0

I have exported excel table like that

but i need another format like that:


00008BN07 item1 subitem1 2,000 6 872,320

00008LN02A item2 subitem1 2,000 10 099,340

…..

020876071 item5 subitem1 1,000 294,260

020876071 item5 subitem2 2,000 294,260

020876071 item5 subitem3 3,000 294,260


How I can reformat first table to second view? Mbe some simple vba script?

Thanks!

  • 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-25T20:38:51+00:00Added an answer on May 25, 2026 at 8:38 pm

    If the columns are A, B, and C, for name, item, and subitem respectively, try this code.
    It makes not claims to try to be optimized.
    When it has run, sort on column C, and delete all the junk that does not contain “SubItem” in column C.

    Sub FillTable()
        Dim lRowCurr As Long
        Dim lRowColA As Long
        Dim lRowColB As Long
    
        lRowCurr = Cells(Rows.Count, 3).End(xlUp).Row
    
        Do
            If InStr(1, Cells(lRowCurr, 3), "subitem") Then
                lRowColA = Cells(lRowCurr, 1).End(xlUp).Row
                lRowColB = Cells(lRowColA, 2).End(xlDown).Row
    
                Cells(lRowCurr, 1) = Cells(lRowColA, 1)
                Cells(lRowCurr, 2) = Cells(lRowColB, 2)
            End If
    
            lRowCurr = lRowCurr - 1
        Loop While lRowCurr > 0
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some PHP script for export MYSQL table into Excel format, but I
I have a XAML file that I exported from Expression Design. I would like
I have an asp:table which I want to exported to excel. One of my
We have a report that the customer would like to have exported to an
I have a big problem with exporting my table to Excel file format. Firstly
I have exported datatable to Excel successfully. Now I have to change some cell
I have a report to be exported in excel, pdf and word using jasper
I have this exported file of some weird (standard for this industry!) format, which
We have some stuff that may be exported into various formats. Currently we have
I have exported email mesages to excel by using a macro. By using Mid

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.