+ Reply to Thread
Results 1 to 19 of 19

Need assistance on Macro for multiple criteria (Allocation Macro)

  1. #1
    Registered User
    Join Date
    09-04-2022
    Location
    India
    MS-Off Ver
    Office 16
    Posts
    32

    Post Need assistance on Macro for multiple criteria (Allocation Macro)

    Hey there,
    I hope you are doing good.

    Attached is the sample file for the "Flecha Audit Sample" to allocate to the team.

    It's a total of 10390 Records available in the attached excel. However, it was not the constant number we received every week. So the actual data should meet a few criteria so that I can allocate the data to the team easily.

    There are 76 unique Rules with "10390" ASIN IDs.

    Criteria 1 - Macro should create a new sheet and paste the all unique rules and ASINs (Count of asin_id) for those rules from "Raw Data". (Basically, need a macro of what actually pivot table will do)

    There is a sheet called "Indetail" in the attached file.

    Criteria 2 - Whatever number I enter in the "should divide" column that many records should be separated into the new sheet and the remaining into another sheet. For instance, If there are "1464" ASINs present for one "rule_name" then if I enter "100" in the "should divide" column then 100 records should copy to a new sheet, and the remaining "1364" records should be copied to another sheet. (This should not pick the top 100 or bottom 100 instead they should pick at random).

    Please review and assist with this...

    Thanks in advance .

    Flecha+Audits+-+FP+Sample+-+Nov+2022 (1).zip
    Last edited by Pawan Sai; 12-30-2022 at 01:06 PM.

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

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Hello. Please, you must confirm what I am going to ask you:

    Do you want the macro to add 152 sheets to the workbook?...
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

  3. #3
    Registered User
    Join Date
    09-04-2022
    Location
    India
    MS-Off Ver
    Office 16
    Posts
    32

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Hey beyond Excel,

    No, my query was not that. I need two different sheets with which I enter the number in the "should divide" sheet in the "Indetail" sheet and the remaining allocation in another sheet.
    You can refer "Indetail" sheet for reference.

    The first column is the rule_name -- the Second column is the total ASIN count -- the Third Column is "Should divide" (Whatever the number I enter in that column the entire data should divide into 2 separate sheets.

    For Example, If I enter 100 in the "Should divide" column then 100 records of that rule should divide into another sheet. 100 in one sheet and the remaining 1364 in another sheet.

    Added 2 more sheets to the attached file for better understanding.
    The "Example" Sheet is the number I entered in the "Should divide" Column (100) and the "Remaining" Sheet is the remaining left data from the Raw sheet (1364).


    I hope this helps.

  4. #4
    Registered User
    Join Date
    09-04-2022
    Location
    India
    MS-Off Ver
    Office 16
    Posts
    32

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Replaced the above existing excel with a new one...
    Please refer to that...

    Thanks in Advance !!

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

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Without a doubt: now it is much better explained and the example in post #1 is much better.

  6. #6
    Registered User
    Join Date
    09-04-2022
    Location
    India
    MS-Off Ver
    Office 16
    Posts
    32

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    😅 It seems that I have to improve myself in explaining better in the starting instant😜. Anyhow, thanks for confirming😊. Please review and advice for the same.

  7. #7
    Registered User
    Join Date
    09-04-2022
    Location
    India
    MS-Off Ver
    Office 16
    Posts
    32

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Hi beyond Excel,

    Any update on this??

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,017

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    For Criteria1: results in "Test"

    Note: i had to amend data for B0BN38R3HQ3/SC/RestrictedProducts/Regulated/UK_Prohibited_Petrol_Cans_FP22022-11-22 06:19:43

    to

    B0BN38R3HQ3/SC/RestrictedProducts/Regulated/UK_Prohibited_Petrol_Cans_FP2022-11-22 06:19:43

    to fit with all entries

    Please Login or Register  to view this content.
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  9. #9
    Registered User
    Join Date
    09-04-2022
    Location
    India
    MS-Off Ver
    Office 16
    Posts
    32

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Hey JohnTopley,

    Thanks for looking into the query.

    I cannot see any changes in the actual data. After running the code it's just clearing the data in the "Should Divide" column from test sheet.
    There is no change in splitting the data. I can see the actual data in all sheets as before. Can you please review it and advise for the same?


    Coming to the note point you mentioned. That's ok even if you amend the data as mentioned.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,017

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    There is no code for the second criteria: the post was just for the first!

    For the split, are you selecting just ONE of the 76 for analysis? and if so, how are you going to make the selection?
    Last edited by JohnTopley; 01-01-2023 at 11:43 AM.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,017

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Please Login or Register  to view this content.

    the ID (selection) and "Should Divid" umber are hard-coded so I need to know how these are selcted.

    Macros called from "Dasboard"
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,017

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Added possibly selection method in "Dashboard" (no code added for this).
    Attached Files Attached Files

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

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Quote Originally Posted by Pawan Sai View Post
    Any update on this??
    Time to time, my friend!...

    Don't forget that you entered the new year 8 hours and a half before us and here we not only celebrate that but also celebrate (and will celebrate for the next 4 years) the World Cup in Qatar (Jajaja).
    '_________________

    Regarding your request, see what I have attached:

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

  14. #14
    Registered User
    Join Date
    09-04-2022
    Location
    India
    MS-Off Ver
    Office 16
    Posts
    32

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Hey beyond Excel,

    I really appreciate your efforts in resolving queries. This was the exact code I was looking for. It was too accurate. This helped me a lot in dividing the data.

    Thank you so much for looking into it and resolving though you have many other things to do.

    Wish you a happiest year ahead. Thanks a lot once again. Much appreciated... 😊

  15. #15
    Registered User
    Join Date
    09-04-2022
    Location
    India
    MS-Off Ver
    Office 16
    Posts
    32

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Hey JohnTopley,

    Thanks for looking into the query. As the below-mentioned code was what I was looking for, your help in creating a pivot also helped me make this method easier. I appreciate your efforts in resolving queries.


    I wish you the happiest year ahead. Thanks a lot once again 😊

  16. #16
    Registered User
    Join Date
    09-04-2022
    Location
    India
    MS-Off Ver
    Office 16
    Posts
    32

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Resolving this thread as the query got resolved. Thanks once again for your solutions.

    I Wish you happy New year 😊

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

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Quote Originally Posted by Pawan Sai View Post
    I really appreciate your efforts in resolving queries. This was the exact code I was looking for.
    And in the same way: I wish you a very happy new year 2023.

  18. #18
    Registered User
    Join Date
    09-04-2022
    Location
    India
    MS-Off Ver
    Office 16
    Posts
    32

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    Thank You 😊

  19. #19
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,017

    Re: Need assistance on Macro for multiple criteria (Allocation Macro)

    You're welcome and thank you for the rep.

+ 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. Macro for allocation
    By somusas in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 10-11-2018, 10:03 PM
  2. Multiple Macro VBA assistance
    By Sintek in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2016, 07:44 AM
  3. Need Macro Assistance - Summarising Multiple Columns from unique username
    By Weekes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2014, 02:31 PM
  4. Need assistance on coming up with an inventory allocation formula
    By GTK-Irvine in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-05-2014, 02:24 PM
  5. Assistance with an allocation formula
    By Andrrewc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2014, 04:31 AM
  6. Need assistance with a long macro involving multiple excel documents.
    By AJAllen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2013, 07:37 PM
  7. [SOLVED] Macro code assistance to edit the year in multiple cells.
    By lilsnoop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2012, 11:18 PM

Tags for this Thread

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