All Questions
22 questions
1
vote
1
answer
161
views
Ordered unique union function
I made a user-defined function union in VBA, such that:
it could take variable parameters
each parameter is a one-column range like ...
1
vote
1
answer
292
views
excel vba discrete random variable udf
I am working on writing a discrete random variable generator function in excel vba. I've pulled this off a number of ways but here is the one I like the most.
Imagine in excel we have the following ...
2
votes
3
answers
999
views
Looking for all numbers where each digit is bigger than the previous digit
This is the "Increasing Number problem", where we are looking for all numbers with \$n\$ digits where each digit is bigger than the digit before it. Or in Mathematical therms where:
$$\mathit{...
3
votes
1
answer
494
views
Excel VBA: Implementing Box Muller, Zigurrat and Ratio of Uniforms Algorithm
This is a very specific question mixing up stochastic knowledge and VBA skills. So very exciting!
I'm trying to compare several methods for generating standard, normally distributed numbers given a ...
2
votes
3
answers
201
views
"Pivoting" data with VBA
I've attempted to erite some VBA for this this question. The output is OK
but the code is not very elegant. I'm happy-ish with creating unique list of names and certificates, but the rest seems ...
1
vote
1
answer
181
views
Space Invader game written In VBA, 3rd iteration [closed]
Here is a link to the workbook, classes, modules and forms:
https://github.com/Evanml2030/Excel-SpaceInvader
Positive:
I have decoupled the view from the control / presenter. I have implemented what ...
7
votes
1
answer
217
views
Sudoku-lite challenge
You can find the problem here.
The example:
Column A, B, and C are each 3 and together equal 9:
...
4
votes
3
answers
653
views
Sub that compares 2 columns fast
This is an answer to this SO question: Vba comparing 2 columns of data.
In that question the OP code is very slow (also not working properly but the problem is fixed)
I spent some time to ...
1
vote
1
answer
168
views
Testing system, reading from Notepad files for VBA
My idea is to make some testing system for functions, as per the model of CodeForces or TopCoder, but in VBA. There, the users write functions for a problem and the problems are tested vs. predefined ...
3
votes
1
answer
644
views
Secret Santa - Pick Pairs
Interested to hear your thoughts on this Secret Santa pairs picker.
It's pretty standard but I'll explain the rules all the same:
All names go into a hat
Each person picks a name from the hat and ...
11
votes
1
answer
298
views
Find all differences between 2 strings
I pulled this out of my code bucket and dusted it off earlier today in response to a post over on SO that made me cringe. This was originally written to highlight changes in Excel cells in real time ...
10
votes
3
answers
1k
views
Cleaning up and reformatting imported data in an Excel sheet
The code below was refactored for performance improvements for another user on this site.
Functionality, high level:
Sheet1 - CodeName aIndex: used as the main reference to the structure of the data ...
5
votes
1
answer
109
views
Update on Weave Merging n lists into single list
This is a follow up to my previous post from 7 months ago. I changed up the algorithm a little. Instead of inserting items into a new list, each item's final place is calculated up front. Sort of like ...
12
votes
3
answers
393
views
Karate Chop Kata
I had some time to kill today, and I found the Karate Chop Kata.
Specification:
Write a binary chop method that takes an integer search target and a sorted array of integers. It should return ...
6
votes
2
answers
381
views
Join two collections by date with no duplicate
Data
I have 4 Collection objects of the following kind:
...