Microsoft Office Tutorials and References
In Depth Information
LIST COMBINATIONS OF N ITEMS TAKEN M AT A TIME
Figure 155. h
e magnii er even magnii es itself !
Breaking It Down: The user form runs a macro called
GetMagniﬁ edImageUnderCursor . This macro loops continuously. To stop the
macro from running, a UserForm_DblClick procedure sets the value of a global
variable to TRUE . When the loop inside GetMagniﬁ edImageUnderCursor
sees that this variable is set to TRUE , the loop is allowed to end.
Note: The accessibility options in Windows provide a magniﬁ er. It is not as cool
as this one, though.
Summary: You can use a utility to magnify a section of an Excel document.
The post was nominated by Greg Truby. Thanks to Ivan F Moala and Jaafar
Tribak for collaborating on the code in this topic.
LIST COMBINATIONS OF N ITEMS
TAKEN M AT A TIME
Challenge: You want to list all unique combinations of m items from a population
set of n items. For example, you might want to generate all possible unique
groups of 4 employees from a set of 10.
Solution: There are two ways to go about this: the quick-and-dirty way and the
better-but-more-difﬁ cult way.
An unimaginative (and rather kludgey) approach to solving the problem for
m=3 could be: