[Solved] Macro program-split cell and paste in column

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
User avatar
chandrankrishnan
Posts: 63
Joined: Sat Mar 05, 2016 1:21 pm

[Solved] Macro program-split cell and paste in column

Post by chandrankrishnan »

Hi all, Good day.

Can any one Help me with an macro program for the attached file. I failed to get the output.

Thanks in advance.
Attachments
SAMPLE.ods
(13.74 KiB) Downloaded 141 times
Last edited by Hagar Delest on Tue Sep 20, 2016 8:19 am, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 4.1.2 windows vista
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: Need of macro program-split cell and paste in column

Post by JohnSUN-Pensioner »

It seems to me that you looking something like this
Attachments
SAMPLE.ods
Array function getUniqumList(range_DPPARTNO, range_LOCATIONTOP, range_LOCATIONBOTTOM )
(11.79 KiB) Downloaded 131 times
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
User avatar
chandrankrishnan
Posts: 63
Joined: Sat Mar 05, 2016 1:21 pm

Re: Need of macro program-split cell and paste in column

Post by chandrankrishnan »

Hi john, thanks for the reply,you are correct,my idea of output is same as you mentioned.

Also kindly clarify me whether this will delete the duplicates if any.

While running the macro i am getting an error as Basic run-time error as :

"Argument is not optional" in If Not IsArray(aDPPARTNO)Then Exit Function

Please help me.
OpenOffice 4.1.2 windows vista
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: Need of macro program-split cell and paste in column

Post by JohnSUN-Pensioner »

chandrankrishnan wrote: Also kindly clarify me whether this will delete the duplicates if any.
Yes, duplicate removal occurs at the moment of collecting information from the original data sets.
chandrankrishnan wrote: While running the macro...
This macro is not necessary "to run". It should be in the right place at the free sheet write the formula similar to

Code: Select all

=GETUNIQUMLIST(INPUT.B3:B5;INPUT.K3:K5;INPUT.L3:L5)
where first param is range with all cells of source "DP PART NO." , second param - cells of "LOCATIONTOP" and the last param - "LOCATIONBOTTOM"
Press Ctrl+Shift+Enter and get array of result.
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
User avatar
chandrankrishnan
Posts: 63
Joined: Sat Mar 05, 2016 1:21 pm

Re: Need of macro program-split cell and paste in column

Post by chandrankrishnan »

John thanks once again,but while pasting the formula i am not getting the result(pasted as you mentioned). Kindly guide me.

Whether its not possible in macro program.

Please help me.
OpenOffice 4.1.2 windows vista
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: Need of macro program-split cell and paste in column

Post by JohnSUN-Pensioner »

Yes, beginners these actions somehow cause difficulties
See small instruction here
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
User avatar
chandrankrishnan
Posts: 63
Joined: Sat Mar 05, 2016 1:21 pm

Re: Need of macro program-split cell and paste in column

Post by chandrankrishnan »

Thanks john,its working fine. You are really great to be kind to teach others in simple way.

Thanks alot.

Just an doubt when the program assigned in macro button it shows error.It cannt be assigned in macro button.

Help me in this.

Thanks in advance.
OpenOffice 4.1.2 windows vista
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: Need of macro program-split cell and paste in column

Post by JohnSUN-Pensioner »

Of course, it can be assigned in macro button. But in describing the problem, you do not say anything about the button
Attachments
Split cell and paste in column (dialog).ods
With button
(20.87 KiB) Downloaded 126 times
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
User avatar
chandrankrishnan
Posts: 63
Joined: Sat Mar 05, 2016 1:21 pm

Re: Need of macro program-split cell and paste in column

Post by chandrankrishnan »

John thank-you very much.Its working fine.

It was very good experience and learned a new thing through this forum especially through John. He Helped me in all minor doubts and guided me in all aspects.

Thanks john.

Good day.
OpenOffice 4.1.2 windows vista
Post Reply