[Solved] Picking variable Parts of Columns to make new one

Discuss the spreadsheet application
Post Reply
Kapa150
Posts: 14
Joined: Sun Apr 19, 2020 1:41 pm

[Solved] Picking variable Parts of Columns to make new one

Post by Kapa150 »

Hi Everybody,

i don't know if this is even possible, but i thought i'd ask since people in this forum have been very helpful before!

i have a couple of columns with coordinate values (several columns for x coord, and several for y coord) and i want to pick out the first n (this is a variable that changes) number of each column and add them to a new column.

in the attachment you can see what i mean. the values that are supposed to be at the top of the colums are the values in J-M (that's not an issue because here the n doesn't change) but then the values following them (values from R-AK) have to be below them (and only the highlighted ones! and again, if n changes, others get hightlighted. n is in Q2). the end result should look like the columns A and B (only if i change n, it should change the number of x and y coords listed. currently n=4, so it shows 4 of each colum)

does anyone know how to do that?

thx
Attachments
Starology V2.ods
(55.53 KiB) Downloaded 100 times
Last edited by Kapa150 on Tue May 05, 2020 9:24 pm, edited 1 time in total.
Windows 10, Open Office Version 4.1.6
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: Picking variable Parts of Columns and making a new one

Post by jrkrideau »

Cn you explain in substantive terms what you are doing? It is probably possible to do what you want. Though not by me!

After looking at the sheet for a little while I get the feeling that the layout is far too complicated. It looks like the layout that makes sense to a human and not to a spreadsheet

So if you can give us a good description of what the data is and what output you want, we may be able to make some suggestions
LibreOffice 7.3.7. 2; Ubuntu 22.04
Kapa150
Posts: 14
Joined: Sun Apr 19, 2020 1:41 pm

Re: Picking variable Parts of Columns and making a new one

Post by Kapa150 »

thx for the response, sure i can explain.
it draws a star. the two circles (J, K are the x and y coords for the inner circle, L, M are the coords for the outer circle) and R+AK are the lines connecting the inner dots with the outer ones (forming a star). it's also rotatable (P2 is the rotation is radiants). you can plot the A and B coords as an XY Diagram if you wanna check it out. (further to the right, there is another star, a pentagram, that works in a similar way)
the reason i wanna have them in a column is for convenience (so i can see them all in one place) and so it can put them in the form that i want them more easily (see D5 downwards to check out the form that i want them in).
now please don't misunderstand, i'm not looking for other ways of getting the coords in the form (D5 downwards), i'm sure there is some other way, but i am specifically interested in whether what i asked in the original post is possible. namely picking n number of the coords and arranging them in a column for x and y respectively.

i hope that clears things up. if not feel free to ask for more clarifications
cheers,

(PS: it looks complicated because i don't know what i'm doing ;) i improvised the thing so it's not as clean as it could be i'm sure xD. but i wanna build on it, and NOT change it fundamentally)
Windows 10, Open Office Version 4.1.6
User avatar
MrProgrammer
Moderator
Posts: 4907
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Picking variable Parts of Columns and making a new one

Post by MrProgrammer »

Kapa150 wrote:i have a couple of columns with coordinate values (several columns for x coord, and several for y coord) and i want to pick out the first n (this is a variable that changes) number of each column and add them to a new column.
It would help if you would just state that the mysterious n is the value of cell Q2 instead of making us dig for that. Examine the formulas in A12:B12 and below. Read about functions you are not familiar with.
202005051332.ods
(39.77 KiB) Downloaded 121 times
 Edit: I see that [Solved] Changing Color of n Fields is a similar question from the OP. 
If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Kapa150
Posts: 14
Joined: Sun Apr 19, 2020 1:41 pm

Re: Picking variable Parts of Columns and making a new one

Post by Kapa150 »

"It would help if you would just state that the mysterious n is the value of cell Q2 instead of making us dig for that." MrProgrammer
i did, in the original post "n is in Q2"
i can even tell you what it is, if you're interested, it's the number of points inbetween the inner and outer circler (for the first star)
Windows 10, Open Office Version 4.1.6
Kapa150
Posts: 14
Joined: Sun Apr 19, 2020 1:41 pm

Re: Picking variable Parts of Columns and making a new one

Post by Kapa150 »

i just realized that your profile pic has a pentagram in it. the second star (if you scroll to the right, is a pentagram) :) Draw A0, AP from 7 to 61 as an XY diagram if you wanna check it out ;) (it also rotates if you change the value in P2 (enter the rotation in radiants)

cheers,
Windows 10, Open Office Version 4.1.6
Kapa150
Posts: 14
Joined: Sun Apr 19, 2020 1:41 pm

Re: Picking variable Parts of Columns and making a new one

Post by Kapa150 »

i just checked out your solution to my question MrProgrammer. and it seems to do what i asked, but if you draw the star after increasing n, the star is wrong. maybe that's a problem with my spreadsheet tho, i'll have to look into that
Windows 10, Open Office Version 4.1.6
Kapa150
Posts: 14
Joined: Sun Apr 19, 2020 1:41 pm

Re: Picking variable Parts of Columns and making a new one

Post by Kapa150 »

oh, it's just because oyu removed the references, nvm

thx for the quick response! i tried it in my spreadsheet and it works! Now all that's left to do, is try to figure out that all those commands mean xD

ty
Windows 10, Open Office Version 4.1.6
Post Reply