+ Reply to Thread
Results 1 to 4 of 4

Can someone please explain this set of functions?

  1. #1
    Registered User
    Join Date
    09-26-2018
    Location
    HK
    MS-Off Ver
    8
    Posts
    2

    Can someone please explain this set of functions?

    Hi all,

    Below is the functions I used in a lucky draw thing and it works but I don't really get how the middle part works
    Can somebody please explain the aggregation part of it? and how does the range works in the function Match also.

    =IF(ROWS(C$2:C2)>B$2,"",INDEX(A$2:A$6,AGGREGATE(15,6,((ROW(A$2:A$6)-ROW(A$2)+1)/ISNA(MATCH(A$2:A$6,C$1:C1,0))),RANDBETWEEN(1,ROWS(A$2:A$6)-COUNTA(C$1:C1)+1))))

    Just need 3 columns for this function.
    Column A is the draw list.
    Column B has only one cell which is the number of draws
    Column C is where to place the above function and can simply drag down to the number you need and can be refresh by pressing F9.

    When I try to figure out how it works, I found out that some of the middle parts will get errors if they just stand alone.
    Thank you in advance for your time and effort!

    Regards,
    Leo
    Attached Files Attached Files
    Last edited by tigerbanana; 09-27-2018 at 01:00 AM.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Can someone please explain this set of functions?

    Hi Leo. Welcome to the forum. It helps ... we're volunteers ... if you upload a small representative Excel workbook. Otherwise we have to "invent" the data and try and explain from there.

    To attach a file to your post: (Please no pics or screenshots ... saves retyping data.),
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Dave

  3. #3
    Registered User
    Join Date
    09-26-2018
    Location
    HK
    MS-Off Ver
    8
    Posts
    2

    Re: Can someone please explain this set of functions?

    Noted and thank you very much!

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,521

    Re: Can someone please explain this set of functions?

    Use the Evaluate Formula feature to see how the formula works.
    As for the AGGREGATE function, when you look at the help, there are 19 functions that can be combined with 8 options, therefore the functions/options are aggregated. In this case AGGREGATE is using function 15 (small) along with option 6 (ignore errors) to randomly return the Kth smallest row of the numbers in column A not already in use in column C.
    As for the MATCH function, it is matching the numbers that have previously been used in the cells in column C to the numbers listed in column A.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Tried to Explain
    By msaric in forum The Water Cooler
    Replies: 12
    Last Post: 10-25-2013, 06:51 PM
  2. What is Dim? How do I use it? PLEASE EXPLAIN
    By TruBeast in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-17-2013, 10:25 PM
  3. explain VBA
    By simpson in forum Excel General
    Replies: 6
    Last Post: 02-18-2010, 07:03 PM
  4. How to explain??...
    By tagr in forum Excel General
    Replies: 2
    Last Post: 03-17-2006, 11:34 PM
  5. [SOLVED] Let me see if I can explain this...
    By jsc3489 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  6. Let me see if I can explain this...
    By jsc3489 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  7. Let me see if I can explain this...
    By jsc3489 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  8. Explain these please
    By Sal in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-24-2005, 05:51 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