Break lines in cell after creating drop-down list with few arguments - libreoffice

I use libre office calc.
I have simple calc sheet with some customers data:
sheet with data
Now i want create drop-down list, where i will choose detailed customer data to have his basic data, only name, surname and address.
I used formula like this in data -> validity -> cell range:
Name&" "&Surname&" "&Address
It works, but it not looks nice. Text is long and it depends on length of cell.
I would like to have it in this way:
<First name> <Last Name>
<Address>
Is that possible to do in this way?
If yes, is it also possibility to divide address automatically into two lines after comma or in place i will choose?

Related

QUERY which outputs a hyperlink to a cell in another tab in the same sheet

In Google Sheets, I'm trying to write a QUERY which outputs a column displaying a hyperlink which links you to the cell pulled in by the QUERY, in another tab on the same sheet.
Example (all within the same Sheet):
Tab 1:
**Name**
Chandler
Ross
Joey
Utilizing the hyperlink() function as I read from this question, I've been able to link to another tab within the same sheet by hardcoding the hyperlink formula. But how can you incorporate this within a QUERY?
Tab 2: (my attempt but errors out)
=QUERY(Sheet1!A:A,"SELECT hyperlink("#gid=123456789range=A2", A2)")
Desired Output:
**Name**
Chandler [hyperlinked to cell A2]
Ross [hyperlinked to cell A3]
Joey [hyperlinked to cell A4]
I am going to give the answer in more general terms than you asked for, so that it is (hopefully) more useful to others.
You can do this by turning your attempt inside out. That is, use QUERY to pull the data, input it into HYPERLINK, and then use ARRAYFORMULA to do this for the whole list. Since you need the matched pairs of the names and the corresponding URLs, QUERY will be used twice with the same filter condition.
For example, if you had the table:
**Table A1:C4**
Name, URL, Rating
SE,https://stackexchange.com, 2
Physics SE,https://physics.stackexchange.com, 4
Maths SE,https://math.stackexchange.com, 5
and you wanted to list all the URLs where the rating was greater than 3, labelled by the corresponding name in column A, then you could use:
=arrayformula(hyperlink(query(A2:C4,"select B where C>3,0),query(A2:C4,"select A where C>3",0)))
This will output a column containing two links:
SE
Maths SE

Transpose columns in another sheet to rows via Data > Validity dropdown

I have a collection of addresses on one LibreOffice Calc sheet (7 columns, 1st name, 2nd street and so one) and want to create an invoice template on another sheet.
I know how to retrieve and transpose a known row - the solution on this other question explains that: Transpose column on one sheet to row on another, with linking
However, this does not seem to work if I use Data > Validity to fill the first cell in the address area (7 cells below each other).
What I am basically trying to accomplish is a dropdown in the first cell where I select the name and it automatically retrieves the address from the other sheet into the cells below.
Is this possible or am I overthinking here?
I suggest:
Name the data in your first column (eg CName)
Name your array of data (eg Clients)
Set the Source for Validity Criteria to CName
Assuming the validation is in A1, in A2 and copied down to suit:
=VLOOKUP(A$1,Clients,ROW()-0,0)
The -0 is not required if the validation is in Row1 but is where an offset should be made if not.

Create Actions From Tableau Map (with points)

I am familiar with how to create actions in Tableau, but doing so with map points has stumped me. It seems as though Tableau uses the lat/long measures uniquely and different than how it would another measure.
The expected behavior I want is a user to be able to select a single map point from a Tableau sheet so I can use that selection to drive an action (in this case adding the selection to a separate, blank sheet).
Here is one workaround, but this isn't a stable solution for the end-user:
1) Find desired map point -> right-click -> keep only
2) From the new 'Inclusion' pill that appears under 'Filters'...right-click -> apply to worksheets -> selected worksheets -> choose sheet
Thanks, Vamsi. I solved this morning a bit differently, it was actually really easy and didn't require any calculations:
Used carrot on my map's toolbar to 'Use as filter.'
Added a hidden crosstab to the same dashboard that, of course, changed to show the chosen map point.
Used that sheet to power my other calculation.
Essentially, I had to have both sheets on the same dashboard which allowed 'Use as filter' to solve my challenge.
(A) As each map point (generated lat/long value) is linked to a specific set of Geographic dimensions, you can create an index/combination of these fields as a calculated field.
For example, if the fields "City", "State" are the geographic dimensions, create a calculated field
Index = [City] + ", " + [State]
After you create an Action filter from the map to the desired blank sheet, at the bottom of the "Add filter Action" window use "Selected fields" under Target filters and click Add filter. In the pop-up, select the recently created Index field for filtering.
(B) You can also just add the City and State fields separately into the "Selected fields" in the Action filter and not have to create the Index altogether.
In both ways, even if there are multiple rows of data for the same location on the map, the result would show all those rows.

Group by first two characters of column, in Tableau?

I'm using Tableau Desktop v9.0. I have data that looks like this:
code,items
02050252,7
03040620,19
03060423,3
I want to create a bar chart of the items grouped by the first two characters of the code field.
So effectively a chart that shows this underlying data:
new_code,items
02,7
03,22
Is it possible to do this within Tableau? Or do I need to group the data manually myself first?
You can definitely do this within Tableau.
Make sure that your code column is a string. If it's not, right click on it in the dimensions section and choose Change Data Type.
Then, create a calculated field (Analysis -> Create Calculated Field) and enter the expression LEFT([Code], 2), which will take the first two characters of the code field.
Drag your new_code field to the Rows shelf and Items to the Columns shelf and voila, you have your desired data. You can of course change the type of the chart, make it a table, etc. from here.

Libreoffice Calc reference cell with a specific progression

I have a collumn with this contend inside:
=sheet1.F8
=sheet1.F15
=sheet1.F22
Normally in the excel I select the three cells and pull down, excel understand the logic and the next cell above will be "sheet1.F29". But if I do this in Libreoffice it puts "sheet1.F11".
Do you have any idea of how to do this ? (I have several sheets like this logic and I'd like to use Libreoffice instead Excel).
I found a workaround and replying here:
It is setting the reference to “F11” because the first row contains a reference to F8 and the new entry is 3 rows beneath this i.e., the offset is based on the first cell of the selection, thus 8+3=11. A workaround is to use the addresses of the destination and combine this with the INDIRECT() function. For example, create a separate column with “Sheet1.F8”, “Sheet1.F15”, and Sheet1.F22” etc. Highlight and drag this column of values to obtain a column of correct address references. Then adjacent to this use (given “Sheet1.F8” in sheet 2 cell A1) =INDIRECT(A1) in B1. Now drag this down the B column to obtain the required values.