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

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

Related

Jasper Reports does not find correctly the pages in TOC (table of contents) when there are duplicate titles

I hope you are very well.
Currently I am developing a report be means of Jasper Reports and Java, for doing it I am using two groups, to group the elements of the data source.
DataSoruce returned by the database has the follows structure (it has two columns):
Group 1 | SubGroup A
Group 2 | SubGroup A
I am showing the result in the jasper file with the follows way:
->Group 1
SubGroup A
->Group 2
SubGroup A
Like you can see, there are two groups: Group 1 and 2, and each group has a subgroup, for this example is the same subgroup (SubGroup A).
Every groups were configurated for appearing in the Toc (table of contents report). I used iReport tool, and configured each group to has a Hiperlink and a Bookmark Level. (Groups with 1 Bookmark level and SubGroups with 2 Bookmark level).
Every works fine, the TOC appears correctly and when I select one element in TOC index, the document arrived me to correspondent page, however there is a problem, when the name of Group, or SubGrups, is the same each other (it has already appeared in the TOC, its name is duplicated), the Pdf file does not arrived correct page, takes me to the first page they have that title.
Does someone know how can I solve this problem.
Thanks for your help.
I was able to solve the problem.
1.- I created an variable RANDOM with the expression:
new Random().nextInt(1000)
2.- In the Anchor Name Expression I have called the variable RANDOM and behind it I wrote an *.
$F{TITLE} + "* " + $V{RANDOM}
3.- In the TOC report I added the follows expression each $F{label}, like this:
( $F{label}.contains("*") ? $F{label}.substring( 0, $F{label}.indexOf("*" )) : $F{label} )
And it is all, each title will be a unique name and the index will have the link correct for each page.

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.

Displaying a 'Top Result' with Algolia?

I want to search 3 different indices at once, breaking out their results into 3 separate sections.
Above these 3 sections though, I want to display a 4th section with a single result row, and this section will be titled "Best Result".
It should take the best result of the 3 indices that most perfectly matches.
Does anyone know how I can achieve this? Thanks!
By design, when the ranking of each index is properly set (both attributeToIndex, and customRanking settings filled), the Algolia engine returns the most relevant et popular results for each new search request. First the one without typos and with perfect matches, then the others...
Which mean that if you want to display all the top results on a single page, you only need to take the N first result of each index.
Then it's just a matter of display. Like on the following websites, you can imagine to display those results into multiple columns:
http://telly.com/
Prototype built using the TED API
Feel free to look at tips about the best way to display result hits in multiple columns using Algolia and Bootstrap 3
Beside that you can also consider passing the getRankingInfo=1 parameter with your search query, and filter the results displayed accordingly to the matching info returned for each hit within the _rankingInfo property.
firstMatchedWord: 2000
geoDistance: 0
geoPrecision: 1
nbExactWords: 2
nbTypos: 0
proximityDistance: 1
userScore: 9499
words: 2

Display Records Horizontally Instead of Vertical in Cells, SSRS

I'm trying to display multiple values for one drive by adding a column for each additional record assigned to a drive. For example, a drive ID is unique but can have multiple promotional incentives assigned to it.
For example, if we go to a university on 1/23/2015, that will a unique event or record in the DriveMaster table, but if we are giving away T-Shirts and Pizza, those two records will be assigned to the drive in the EquipmentDetail table.
In SSRS, I'm trying to create a sub-report that will display the promotional items on one line instead of adding additional lines for each promotional item. See screenshot below.
What I'd like to have happen is have the each drive only account for 1 row, and each promotional item listed in a new column to the right. See mockup in Excel.
Is there a way to handle this? I know there is in Crytal Reports, but I can't figure this out in SSRS. I've tried using a Matrix, but I can't see to get the columns to grow if there are multiple incentives.
I added a column group on the Description field, and it looks like that it is close, but that the grouping will create blank spaces (cells) in it.
Thanks,
You have to set a Column Group for your promotional item in your Matrix.
Hope that helps.
Edit:
It looks like there are some areas that contain no data (because of your groupings)
We can do something like the following:
In your query you can use the 'over'
Select DriveID, PromotionItem, ... ,
ROW_NUMBER() Over(Partition by Select DriveID, PromotionItem, ... Order by PromotionItem)
AS ColumnGroupNumber
Then in the Promotion Item group that you have change the field it groups on to the ColumnGroupNumber (or whatever you are going to call it). Just don't change the field in the detail row, or you will not see the details.
I have used this solution before. I found it 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.