+ Reply to Thread
Results 1 to 6 of 6

VB Code to reorganize data

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to reorganize data

    Hello:

    Please refer to attached file.
    I need VB code to reorganize data as shown.
    Item Desc in column B
    Item Code in column C
    StoreName in column D
    Size in Column F
    Item Sold in Column G
    Item Inventory on Hand in column H
    I have created join in column I (StoreName&Size), this is listed in cell M1:AA1
    I need code to go thru item from cell B2 down.
    Enter Item Desc from column B in column K as shown with its coe in column L.
    Now see Join in column I and enter sold qty as shown in cell M2 and Inventory in M3.
    Now go thru anoother item from column B and enter in column K as shown with its code.
    Now see Join in column I and enter sold qty as shown in cell O4 and Inventory in O5.
    And so on


    I hope this is clear.


    Let me know if you have any questions.
    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VB Code to reorganize data

    Why not just use a pivot table?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to reorganize data

    Hello:

    I have tried pivot but was confused how to get it as required.
    Please help with pivot table if that can work.

    Thanks

    R

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VB Code to reorganize data

    Insert a pivot table with Table1 as the source.

    Values:
    Sold (Summarize Values By: Sum)
    Inv (Summarize Values By: Sum)

    Columns:
    Store
    Join

    Rows:
    Desc
    Store
    Σ Values


    Pivot Table > Design Subtotals > Do Not Show Subtotals
    Pivot Table > Design > Report Layout > Show in Tabular Form

    Format to suit.


  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: VB Code to reorganize data

    Riz
    Attached is a Pivot Table. Advise if this works for you.



    EDIT: Looks like Olly gave you the solution, already.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to reorganize data

    Hello Olly & Alan:

    Thanks a lot, i will try to use this solution to fit in my situation.

    R

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VB Code or formula to reorganize data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-06-2018, 01:00 PM
  2. [SOLVED] VB Code to reorganize data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-01-2017, 04:31 PM
  3. [SOLVED] VB Code to reorganize data in a row
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2016, 04:41 PM
  4. [SOLVED] VB Code to reorganize data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2016, 08:57 PM
  5. VB Code to reorganize data..
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-19-2016, 11:09 PM
  6. VB Code to reorganize data in a sheet
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2016, 08:27 PM
  7. [SOLVED] VB Code to reorganize data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 03-29-2016, 04:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1