LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 224
Default Generate powerset in Excel?

Is there a quick way to generate a powerset in Excel?

A powerset is the set of all possible combinations of the items in a
set. For example, given the set a, b, and c, the powerset is:

a
b
c
ab
ac
bc
abc

(Technically a powerset also includes the null set, but I'm not
concerned about that here.)

That's easy enough to do manually with such a small set as this
example, but obviously becomes much more tedious and error prone to do
manually as the set becomes larger.

I could make three column headers in a sheet and enter all three items
under all three columns, plus one additional item in each field
indicating blank while still being counted as a record (such as the
string "blank"), and then do a Cartesian Product on those three fields
in MS Query from Excel. But that would return separate records for
each possible *sequence* of the same items, such as both ab and ba.
For my purposes, ab and ba would effectively be duplicates.

FWIW, the reason for this is I have a dropdown where a seller
indicates all shipping options they offer, in a comma-separated list,
from a list of all approved shipping options. Some sellers might only
offer one of the approved shipping options, some two, some all, etc.
But the list of all approved options occasionally changes (outside my
control), requiring an update of the dropdown list. A list made from a
Cartesian Product would be a huge number of dropdown items (and
therefore annoying for sellers to use) comared to a powerset.

Any thoughts?


Thanks,

Greg
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
To generate Numbers in Excel Sonal Excel Worksheet Functions 3 June 13th 08 09:28 AM
Using Excel to generate schedules Carla Excel Discussion (Misc queries) 1 October 20th 07 09:21 AM
How can I generate UPC"S through excel? LLoana Charts and Charting in Excel 0 April 5th 07 06:26 PM
generate a random number and use if function to generate new data Dogdoc1142 Excel Worksheet Functions 4 April 26th 06 03:44 AM
can i use excel to generate web links simonrowland Excel Discussion (Misc queries) 1 August 10th 05 11:51 PM


All times are GMT +1. The time now is 06:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"