Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Let's say Column M has string type of data starting from row 2 and correspondingly column N (starting from row 2) has some number type of data in the following manner. Column M Column N Advanced Revelations 23 Macromedia Cold fusion 34 ABC BCD EF GY 45 The in column I, I want to output all the combinations of words (with respect to spaces) in Column I (along with the original number codes of column N to be in Column J) My desired output would be Column I Column J Advanced Revelations 23 AdvancedRevelations 23 Macromedia Cold fusion 34 Macromedia Coldfusion 34 MacromediaCold fusion 34 MacromediaCold fusion 34 ABC BCD EF GY 45 ABC BCD EFGY 45 ABC BCDEF GY 45 ABCBCD EF GY 45 ABC BCDEFGY 45 ABCBCD EFGY 45 ABCBCD EFGY 45 ABCBCDEFGY 45 Basically if the original cell has 5 words, then there will be 4 spaces among these 5 words. I want to output the 2 power 4 ( 2 ^ 4) combinations starting from no space to space between any 2 words ( space between any 2 words is same as the original data in Column M). Please tell me how to go about it. I have some basic codes for splitting original word in the cell and concatenating cells but when it comes to permutation, Iam not able to think of how to set up the code in such a way that if there are 8 words in the cell then there would be 2^7 combinations to be considered. Iam clueless about how to simulate the number of permutations programmatically. Im posting my naive code in the follow up mail to this. Thanks a lot, Hari India |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to convert numeric to words Example 525 in words (Twenty five | Excel Discussion (Misc queries) | |||
how do I remove leading spaces and leave the remianing spaces w | Excel Worksheet Functions | |||
spaces not recognized as spaces | Excel Worksheet Functions | |||
Remove spaces between words | Excel Discussion (Misc queries) | |||
macro to eliminate spaces between words | Excel Discussion (Misc queries) |