Trim text in Google sheet - google-sheets

https://videows1.douyucdn.cn/live/high_12350844720190721092508-upload-f6cd/0704ae76898440f99c6e738c687d413a_0000000.ts?k=db7c96ce8829f45a9b473a453c73dd8a&t=15d4b829f&nlimit=5&u=275209677&ct=web&vid=10201331&pt=2&cdn=ws&d=6c1ede202b60f1196d299eb100091501
I want to trim this URL in 3 rows in Google sheet like that
A1:
https://videows1.douyucdn.cn/live/high_12350844720190721092508-upload-f6cd/0704ae76898440f99c6e738c687d413a
A2:
_0000000.ts
A3:
?k=db7c96ce8829f45a9b473a453c73dd8a&t=15d4b829f&nlimit=5&u=275209677&ct=web&vid=10201331&pt=2&cdn=ws&d=6c1ede202b60f1196d299eb100091501

cell A1:
=LEFT(INDEX(SPLIT(A6, "?"),,1),LEN(INDEX(SPLIT(A6, "?"),,1))-11)
cell A2:
=RIGHT(INDEX(SPLIT(A6, "?"),,1), 11)
cell A3:
="?"&INDEX(SPLIT(A6, "?"),,2)
all in one:
={LEFT(INDEX(SPLIT(A6, "?"),,1),LEN(INDEX(SPLIT(A6, "?"),,1))-11);
RIGHT(INDEX(SPLIT(A6, "?"),,1), 11);
"?"&INDEX(SPLIT(A6, "?"),,2)}

Related

Multiple links to hyperlink string (Split and concatenate with ArrayFormula)

I'm trying to figure out how to make a formula to turn links in one cell into hyperlinks in another
From cell A1, A2 etc I'm trying to get cell B1, B2 etc using the Split and concatenate formulas. But it's not possible to process each link to make a "wrapper" and then wrap it back into one cell
A1
https://link.com/xxxxxx1, https://link.com/xxxxxx2, https://link.com/xxxxxx3
A2
https://link.com/xxxxxx1, https://link.com/xxxxxx2, https://link.com/xxxxxx3, https://link.com/xxxxxx4, https://link.com/xxxxxx5
B1
Button 1, Button 2, Button 3
B2
Button 1, Button 2, Button 3, Button 4, Button 5
https://docs.google.com/spreadsheets/d/1v8dYt6CIgwnlcc5HKJLNvuAcLZI0IKRTInsprs56hsU/edit?usp=sharing
try:
=INDEX(TEXTJOIN(", ", 1, "<a href="""&SPLIT(A1, ", ")&""">"&
"Name "&SEQUENCE(1, 3)&"</a>"))
arrayformula:
=INDEX(REGEXREPLACE(TRIM(FLATTEN(QUERY(TRANSPOSE(IF(A1:A="",,
IF(IFERROR(SPLIT(A1:A, ", "))="",,"<a href="""&SPLIT(A1:A, ", ")&""">"&
"Button "&SEQUENCE(1, 5)&"</a>,"))),,9^8))), ",$", ))

Google Spreadsheets, Insert a cell value to another cell

I don't know anything about scripts so I would prefer a function.
I have a table like this:
a1
b1
c1
a2
b2
c2
If "a1" = 1 a2 = today's date.
For example:
if I write to a1 cell a "1" it will "transform" into today's date,
if anything else nothing happens.
You can simply put this formula in A2 cell :
=if(A1=1,TODAY(),"")

Google Sheet cell value does not match

I am trying to compare to cell in google sheet. Both the cell contains Value "Saturday".
Cell A1 = TEXT(WEEKDAY(N1),"dddd") value is "Saturday"
Cell A2 = =B2 value is "Saturday"
but when I compare both =IF(A1=A2,"TRUE","FALSE") Result is FALSE. I tried changing both cell to plain text but it did not work. Any solution?

Google spreadsheet: use value as row number

I have a return value from a function in cell A1. Let's say it's 51.
How can I use this value as a row number. I don't want 51 in A1 but instead I want the value from cell A51 in cell A1.
Is there a formula?
Use indirect:
= indirect ("A"& 51)

Google spreadsheet cell reference from value of another cell

This is the scenario:
In cell A1 I have value "12".
In cell B1 I enter value "1".
In cell C1 I want to have value of Column "A" and row defined in cell B1.
How can I display the value "12"?
=INDIRECT("A"&B1)
Help page for INDIRECT function: https://support.google.com/drive/answer/3093377?hl=en-GB

Resources