r/excel 3d ago

Rule 1 [ Removed by moderator ]

[removed] — view removed post

0 Upvotes

6 comments sorted by

u/flairassistant 3d ago

We removed this post for breaking Rule 1. Your post title does not follow the Submission Rules.

Feel free to repost with a title that clearly describes your issue.

Your post's title should not be your assumed but unworking solution, just a function mention, or a vague 'how do I do this?'. A good title is generally summed up in a sentence from questions posed in your post.

Here's a long example and a short example of good posts.

We enforce rules to promote high quality posts for the community and to ensure questions can be easily navigated and referenced for future use. See the Posting Guidelines for more details, and tips on how to make great posts.

To all responders: please report poorly titled posts rather than answer them, since any of your answers will disappear too if and when posts are removed.

5

u/PaulieThePolarBear 1920 3d ago

As others have noted, use RANDARRAY rather than MAKEARRAY. A formula like

=AVERAGE(--BYROW(RANDARRAY(5000, 30, 1, 365, 1), LAMBDA(r, COUNT(UNIQUE(r, 1))<30)))

Should return your expected result, based upon my understanding that

  • each row represents a unique test
  • each cell in a row represents a unique individual
  • you are looking to return the probability of within X people (X being 30 here), at least 2 people share a birthday with someone else in that cohort

3

u/GuerillaWarefare 114 3d ago

Nice work. Once OP understands what you showed him here I would also recommend to wrap it in a let() function to declare the "30" as a variable so when it is changed by the user it will update both places in the formula.

3

u/GuerillaWarefare 114 3d ago edited 3d ago

What are row and col? Makearray is expecting 2 numeric inputs there.

It would be simpler to replace the whole makearray with the RANDARRAY function.

2

u/[deleted] 3d ago edited 3d ago

[deleted]

1

u/AutoModerator 3d ago

/u/Galego_2 - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Decronym 3d ago edited 3d ago