OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

generation of a pattern -

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
jaango123
General User
General User


Joined: 12 Apr 2012
Posts: 12

PostPosted: Wed Aug 08, 2012 5:31 am    Post subject: generation of a pattern - Reply with quote

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

Code:
A
B
C
D
E
F
G


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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group