jaango123 General User

Joined: 12 Apr 2012 Posts: 12
|
Posted: Wed Aug 08, 2012 5:31 am Post subject: generation of a pattern - |
|
|
I am trying to capture some patterns using open office basic macros
What I have in column A is as below starting from first row first column
What I need is genaretion of pattern and the result to be stored starting from column B row1. The first row of column B should have the below. Row 1 means we have to check presence of one item
| Code: | | IF(PRESENT(A),A,IF(PRESENT(B),B,IF(PRESENT(C),C,IF(PRESENT(D),D,IF(PRESENT(E),E,IF(PRESENT(F),F,IF(PRESENT(G),G,default))))))) |
row2 of column B should have the below. Again row 2 means checking the presence of two items, combinations starting from top to bottom. The item, that follows the IF condition will be the last item, within the present parantheses.
| Code: | | IF(PRESENT(A) & PRESENT(B),B,IF(PRESENT(A) & PRESENT(C), C etc etc. |
The same way combination of 3 should be there, top to bottom, in row 3 of column B. Like that it should generate the pattern. The column A can have items up to fourty rows |
|