+ Reply to Thread
Results 1 to 11 of 11

distribute balance on quantity to get unit price by divide two columns after merge data

  1. #1
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    distribute balance on quantity to get unit price by divide two columns after merge data

    Hello
    first the result should be in sheets MERGE1,2
    sheet MERGE1= sheet SELLING , sheet MERGE2=sheet BUYING
    so in sheet selling should sum duplicates items based on column C and summing the values for column QTY(G) and TOTAL (I) with ignore column UNIT PRICE because recreate new prices as in sheets MERGE1,2 . after merge data as in sheets MERGE1,2 should divide column TOTAL/QTY to get new Prices and , otherwise data are not repeated based on column C should show normally . I put the slight result. the most important is the duplicate items based on column C .
    notice: the data will increase by add or change every time in sheets SELLING,BUYING
    Attached Files Attached Files

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

    Re: distribute balance on quantity to get unit price by divide two columns after merge da

    What if there is no duplicate in Column C. Excluded or Included as your Sample data is confusing. You have four thousand rows of data and only a few results shown. Please clarify your intent.
    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

  3. #3
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: distribute balance on quantity to get unit price by divide two columns after merge da

    I said
    otherwise data are not repeated based on column C should show normally
    this means will also shows as I put it in result should include it .
    You have four thousand rows of data and only a few results shown
    I said
    the most important is the duplicate items based on column C .
    so how many rows should I add to understand me?

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

    Re: distribute balance on quantity to get unit price by divide two columns after merge da

    Here is a Power Query Solution for selling. Use the same technique to do the buying.

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: distribute balance on quantity to get unit price by divide two columns after merge da

    Hello.
    Let's see if this is what you're looking for?

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: distribute balance on quantity to get unit price by divide two columns after merge da

    Here is a Power Query Solution for selling. Use the same technique to do the buying.
    thanks but I don't any unit price .
    and when I attach the file I can't enable the macro gives me message in bar about security , but I have many files on my desktop works well without this problem .

  7. #7
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: distribute balance on quantity to get unit price by divide two columns after merge da

    @beyond Excel fantastic! choice vba is much great . just I want keeping the formatting and borders in sheets merge1,2. actually your code deletes , may you fix it, please?
    by the way the same problem happened with Alansidman
    when I attached the file I can't enable the macro gives me message in bar about security can't enable macro , but I have many files on my desktop works well without this problem . but I copy all of your codes in my file and works.

  8. #8
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: distribute balance on quantity to get unit price by divide two columns after merge da

    .
    Do you mean this format?
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: distribute balance on quantity to get unit price by divide two columns after merge da

    thanks . just last thing can arrange data by sort from small to big based on column B, please?

  10. #10
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: distribute balance on quantity to get unit price by divide two columns after merge da

    Quote Originally Posted by Mussa-A View Post
    thanks . just last thing can arrange data by sort from small to big based on column B, please?
    I think we're done with this, right?
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: distribute balance on quantity to get unit price by divide two columns after merge da

    I think we're done with this, right?
    really sorry !!
    many thanks for youe help

+ 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] Merge & subtracting Quantity and balance between two sheets
    By abdo meghari in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-09-2022, 11:22 PM
  2. Calculate grand total from multiple rows of quantity and price/unit
    By Onewell in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2014, 11:00 AM
  3. Macro to Divide a Data in Cells and Distribute to X number of Columns
    By paul.serrato in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2013, 12:01 AM
  4. Replies: 3
    Last Post: 01-03-2013, 12:32 AM
  5. Replies: 4
    Last Post: 08-15-2012, 09:49 AM
  6. Replies: 0
    Last Post: 06-14-2012, 04:42 PM
  7. Quantity * Single unit price + 5%
    By wiggo in forum Excel General
    Replies: 2
    Last Post: 02-19-2010, 05:08 AM

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