View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Mr. X. Mr. X. is offline
external usenet poster
 
Posts: 1
Default Scenario Permutations

Thank you very much Max. It worked great.

What if you wanted to add additional columns? What part of the formula do I
need to change.

Thanks again.

"Max" wrote:

Here's something to play with ..

In Sheet1,

Assume you have this 3 x 4 within A1:B4
(ie 3 "action" items in A1:A3, 4 "acc" items in B1:B4)

Deposit a check to a savings account
Withdraw from a checking account
Pass entries to MMA
CD

Then in another sheet,

Put in any starting cell, say in B2:
=OFFSET(Sheet1!$A$1,INT((ROW(A1)-1)/4),)&"
"&OFFSET(Sheet1!$B$1,MOD(ROW(A1)-1,4),)

Copy B2 down by 12 rows to B13 to return the 12 permutations (3 x 4), viz.:

Deposit a check to a savings account
Deposit a check to a checking account
Deposit a check to MMA
Deposit a check to CD
Withdraw from a savings account
Withdraw from a checking account
Withdraw from MMA
Withdraw from CD
Pass entries to a savings account
Pass entries to a checking account
Pass entries to MMA
Pass entries to CD

Adjust the number "4" within both the INT and MOD to suit the number of
items in col B. Then copy the formula down by the number of rows sufficient
to exhaust all the permutations. For eg if you have a 5 x 4 source in Sheet1,
ie 5 items in A1:A5, 4 items in B1:B4, then just use the same formula (no
change required as the number of items in col B is the same), and copy down
by 20 rows (5 x 4) to generate the permutations.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Mr. X." wrote:
I am trying to work with Word Data, in Excel, whereby I would like to take a
certain situations and generate different permutations. For example,
category is Deposit a check and the action is Deposit a check to a savings
account, or checking account, or MMA, or CD etc.

I am not sure if I need to create a macro or if there is a function I could
use.

Help!!!!