If a column has a value (numeric or text) then show it's corresponding cells in another spreadsheet - google-sheets

I have 2 spreadsheets, in the first spreadsheet, in column E, if there is any value present ( whether numeric or text then show its corresponding cells ( i.e only name and ID) in another spreadsheet.
Sheet 1:
Desired Output in spreadsheet 2:
Thank you

You need FILTER() function. Try-
=FILTER(Sheet1!A2:D,Sheet1!D2:D<>"")
Or QUERY() function like-
=QUERY(Sheet1!A:D,"where D is not null",1)

For the ideal output, you may try:
=filter({'Sheet 1'!D:D,'Sheet 1'!A:A ,'Sheet 1'!E:E},'Sheet 1'!E:E<>"")

Related

Match lookup value with importHTML and combine tables in Soogle Sheet

I have total 2 url links both of which match lookup value and want column of second table in first table.
I have first taken a table from the importhtml formula. And the cell that is green is the column lookup value. Which is as follows.
1st table https://www.screener.in/screens/881782/rk-all-stocks/?page=21
=QUERY(IMPORTHTML("https://www.screener.in/screens/881782/rk-all-stocks?page=1", "table",1),"where Col1 is not null",1)
And there is another table in which I want to match the lookup values from the first table and all the values from that table. Which I have tried. Within this google sheet and you can also try in this google sheet.\
=VLOOKUP(B3,IMPORTHTML("https://www.screener.in/screens/881791/rk-holding/?page=1", "table",1),12,0)
2nd table https://www.screener.in/screens/881791/rk-holding/?page=1
In column next to roce I want column of promoter holding. Which you have to take from this url link.
get result like
try this in google sheet. : https://docs.google.com/spreadsheets/d/1yawdkBHkheaXeziWHFBFd3gngO3EQJr0d19lUH9cVfI/edit?usp=sharing
Thanks in Advance.
added formula to your sheet
Cell L3:
=BYROW(B3:B,LAMBDA(bx,IF(bx="",,IFNA(QUERY(IMPORTHTML("https://www.screener.in/screens/881791/rk-holding/?page=1", "table",1),"Select Col12, Col13 Where Col2='"&bx&"'",0)))))
-

Google Sheet multiple matches in uneven data structure

I got this "table" (page raids) and want to do function formating for highlight duplicates (yellow).
Google Sheet
In this case there is match in 2 strings (dark blue):
Name1
Gunslinger
I already try functions VLOOKUP, Match, Filter, countifs and Quary (dont know how it works...) with Index function, but nothing seems work as I want ...
VLOOKUP and Match only gives first value.
Filter doesnt work on this strucker or I dont know how to use it in this case (I know how it works in normal table)
Can someone tell me what function conbination to use that can be put in Function formating ?
Formating for each row:
Example: =IF(B3>0;IF(B4<1490;TRUE;FALSE);FALSE)
ECT.
After some searching and testing, I came up with this:
=ArrayFormula(SUM(IFERROR(FIND(B2&B3;MID(CONCATENATE((TRANSPOSE($B$2:$I$33)));SEQUENCE(LEN(CONCATENATE((TRANSPOSE($B$2:$I$33))));1;1;1);len(B2&B3)))=1)*1))>1
Still need to make the functions more tidy (picture 2 and 3).
See if this is what you are looking for?
Conditional formatting with Custom formula in Range: A2:H:
=LAMBDA(NAME,OR(A1=NAME,A2=NAME,A3=NAME))("Gunslinger")
or do you means you want to highlight only duplicates?
If that is the case, you may try this formula:
=LAMBDA(DATARANGE,
LAMBDA(FLAT,
{{"Team","Duplicate"};{UNIQUE(FLAT),BYROW(UNIQUE(FLAT),LAMBDA(NAME,COUNTIF(FLAT,NAME)>1))}}
)(
QUERY(FLATTEN(
BYCOL(DATARANGE,LAMBDA(C,
BYROW(C,LAMBDA(R,
IF((ROW(R)+1)/4=INT((ROW(R)+1)/4),R,"")
))
))
),"SELECT Col1 WHERE Col1 IS NOT NULL",0)
)
)(A2:H)
This formula returns an array of unique Names with checking if there are Duplicates in the given datarange.
Combine this with the 1st formula should be able to highlight repeated data sets from your table.
Solution for 2 criteria matching:
The formula inside the image form the table of unique match results,
use that result with OR(), XLOOKUP(), OFFSET(), INDEX() as below for the final formula to put into the custom formula in conditional formatting.
=LAMBDA(RESULT,
LAMBDA(NAME,DUP,KEY,
LAMBDA(KEY_M2,KEY_M1,KEY_P1,
OR(
XLOOKUP(KEY_M2&"&&"&KEY_M1,NAME,DUP,FALSE),
XLOOKUP(KEY_M1&"&&"&KEY,NAME,DUP,FALSE),
XLOOKUP(KEY&"&&"&KEY_P1,NAME,DUP,FALSE)
)
)(IFERROR(OFFSET(KEY,-2,0),""),IFERROR(OFFSET(KEY,-1,0),""),IFERROR(OFFSET(KEY,1,0),""))
)(INDEX(RESULT,,1),INDEX(RESULT,,2),A2)
)(
LAMBDA(DATARANGE,
LAMBDA(FLATCLASS,
{{"Name","Duplicate"};{UNIQUE(FLATCLASS),BYROW(UNIQUE(FLATCLASS),LAMBDA(NAME,COUNTIF(FLATCLASS,NAME)>1))}}
)(
QUERY(FLATTEN(
BYCOL(DATARANGE,LAMBDA(C,
BYROW(C,LAMBDA(R,
IF((ROW(R)+1)/4=INT((ROW(R)+1)/4),IF(R="","",INDEX(C,ROW(R)-2)&"&&"&R),"")
))
))
),"SELECT Col1 WHERE Col1 IS NOT NULL",0)
)
)($A$2:$H)
)

How to find a value from a range of cells and place at a specific in google sheet

Suppose I have only one value anywhere at the cell range C2:Z2, I want that value at B2. What can I do?
I need this solution for all the rows bellow this also. The value might at C:C column at one row, at H:H column at another, that means it is dispersed at the range but there will be only one value at the range in a row.
Place this formula in B2:
=ARRAYFORMULA(TRIM(TRANSPOSE(QUERY(TRANSPOSE(C2:Z), , COLUMNS(C2:Z)))))
The formula above works for any type of values.
If your values are numbers then a simpler formula could be used (MMULT does row wise sum here):
=MMULT(
ARRAYFORMULA(--(C2:Z)),
SEQUENCE(COLUMNS(C2:Z), 1, 1, 0)
)
You can use FILTER()
=FILTER(C2:Z2, NOT(ISBLANK(C2:Z2)))
Reference:
FILTER()
if there will be only one value in the row then a simple sum function will do the job for you. put this in B2 ..
=sum(C2:Z2)

SPREADSHEET INDIRECT() with variable column

If A1 has a value of 2, =INDIRECT("L"&(5+A1)) will return me cell L7's content. And my A1 value keeps on being updated.
But I need a way to sort through columns instead of rows, like
L7, M7, N7, O7 and so on...
Which formula can help me sort through the columns? I also know that =COLUMN() returns the current column converted to number, but I had no luck with =INDIRECT((column()+A1)&7).
You can use the address() function inside indirect. Address() returns a cell reference as a string. So for example, if you enter in G5
=indirect(address(A1, column()))
while A1 is 1 the above formula will return the contents of cell G1.
See if this helps?

Lookup and Transpose functions to return multiple values in a cell

I want to use a type of lookup function that will return a range of cells instead of one cell. Then transpose that data.
Typical Vlookup function
VLOOKUP(Value_Lookup Range_Column_False)
I would like that column part to be a range in a row not a specific cell. For example:
If the value exists with the defined range, send the values of the entire row the initial value is in. Then transpose the range in a selected cell.
Is there a way to do this? I am only familiar with the vlookup function, would Index Match work?
Here is a link to an example spreadsheet:
Spreadsheet example
Please try:
=transpose(query(A1:EZ4,"select * where A ='Jimmy Medina' "))
Re supplementary, please try:
=transpose(query(A1:EZ4,"select * where A ='"&'Name Selection'!$A1&"' "))

Resources