GoogleSheets - bringing back last "n" characters that are uppercase only - google-sheets

I have data that brings back a name plus the ticker code. I need to extract the ticker code only into google sheets.
using: =IMPORTXML("https://www.coingecko.com/?page=5","//tr") I bring back 100 coins but the first column is for example
Dogecoin9DOGE
or
Ethereum2ETH
or
Ethereum ClassicETC
I would like to create a column that simply has DOGE or ETH or ETC, anyone know of a way to manipulate the 1st column to get to that?
Thanks
the webpage looks like it is 2 separate columns but the extract does not work that way. I was trying to think of a way to count the uppercase values and then maybe use a RIGHT(len(uppercasevalues)) but not sure how to get there.

You can use REGEXEXTRACT.
=REGEXEXTRACT(A1,"[A-Z]+$")

Related

Taking Column A values comparing to Column B values if they are the same post to Column C

I'm trying to take the names from column A compare them to the names in column B and then have the similar names get listed in column C.
The problem is these names are automatically updated and out of order, and I need the function in column C to update with them. Also, the names will not be in order, this is why I can't use A=B function. The picture shown is an example of what the solution would look like or something similar. After completing this, I would like to continue using the same function to break down the name data even more. Watched a lot of videos on this, can't find anything specific enough to work.
Side note, I have found a way to do this using different pages within the sheets but not in the same sheet side by side. ex. of what solution
I have tried watching lots of YouTube videos, but nothing goes into detail enough and seem to only explain when similar values are next to each other in column A and B.
This is what I use for 2 different sheets but can't find / understand why when changing values in function to single sheet it wont work:
=filter(Sheet1!A2:B,ISNUMBER(match(Sheet1!A2:A,Raid1!A2:A,0)))
Also, another side note: Can't use True or False. And for uneven number of names in the list ex. Column A has 10 and B has 7 it sorts A for names in B and post similar in C.
Try below formula-
=FILTER(C3:C,INDEX(COUNTIFS(D3:D,C3:C))>0)
You can use VLOOKUP to check common values between columns and store them in another column.
=IFERROR(VLOOKUP(A:A,B:B,1,false),"")
Although this will create gaps in the output column. you can get rid of it by by simply using a filter or so.
all you need is:
=FILTER(C3:C; COUNTIFS(D3:D; C3:C))

I can't figure out how to transpose unique values based on specific critera in Google Sheets

I'm trying to create an inventory system for my business. For example, our SKU codes start with "LMS" "RSP" and "CON" for specific locations where we're working.
I'm trying to take all unique "LMS" codes, and copy them to a single sheet from our raw scan data. I've tried variations on REGEXMATCH, and UNIQUE, and TRANSPOSE, IF statements, and , but I'm totally lost. This is not my normal preview.
For example, I've been trying things like:
=FILTER(RAW!B2:B,RAW!B2:B=UNIQUE(RAW!B2:B),REGEXMATCH(RAW!B2:B,"LMS"))
and
=IF(REGEXMATCH(RAW!B2:B,"LMS"),(TRANSPOSE(RAW!B2:B)),"error")
The second example returns all values in RAW!B, while the first one does nothing. Any help would be appreciated.
Try below formula-
=UNIQUE(FILTER(Raw!B2:B,REGEXMATCH(Raw!B2:B,"LMS")))
Or QUERY() function with wild card match-
=UNIQUE(QUERY(Raw!B2:B,"select B where B like 'LMS%'"))

How to transpose rows into columns of contact details without mixing them up? (Google Sheets)

I have a data set of contact details where the emails and their names are scattered in rows, I would like to list them in 2 nice columns. I've tried using "paste special" and use this code below, but none of them worked.
This is how it looks like:
I've tried this code, but it only applies to one row, whereas I want to apply it to all rows and columns.
=transpose(A2:R2)
and
=transpose (A2:R300)
Both don't work. I hope somebody can help me with this, I'd really appreciate it. Thanks in advance!
It looks that you are using the wrong terms so you are using the wrong functions.
Apparently you have a cell with data separated by spaces and break lines and you want to have each email and name on it's own cell, having emails on one column and names on the next column.
One way to achieve that, first replace the separating spaces by using a character like | and the break lines by another different character like $.
Note: Some people use Unicode characters that are very unlikely to appear like ♦, ❤.
To do the above for break lines you could use FIND and REPLACE (Ctrl + H) or function formulas like REGEXREPLACE, SUBSTITUTE, and maybe others. As there are spaces used both as word separators and values separators, FIND and REPLACE can't be used easily. For a single cell, maybe the easier way is to insert the name/email separator manually.
Then separate the cell data. To do this you could use a formula function like SPLIT or Data > Separate values into columns.
Another way is by using Google Apps Script and JavaScript string handling methods but basically the algorithm is the same.
Related
How to split this complex string into 3 columns and 50 rows using Google sheet script
Google Apps Script: Create new rows for cells that contain commas
Google Sheets: string to columns and rows

Parse current cell contents into URL based on the content of the same cell in Google Sheets

I would like to parse the content of a cell into a URL based on the entered content of the same cell in Google Sheets. I need the entire column to be processed.
Right now I can only accomplish this with two columns like this...
Column A has an ID number. Column B uses an array to parse a URL based on the ID number in Column A. The array formula I'm using in B2 is...
=ARRAYFORMULA(HYPERLINK("http://www.website.com/content/"&B3:B, ""&B3:B))
So A3 might have the ID number entry: 216856
And this creates the URL in B3: http://www.website.com/content/216856
But what I would really love, is a way to do this with one column. Perhaps through a script? Can anyone help me with this, please? Thank you!
If you highlight the column you want to transform then go to edit and choose the find and replace functionality or press command shift and H it will also pop up - then in the find field enter: ^ and in the replace field enter http://www.website.com/content/ and check the search using regular expressions checkbox.
Once you click replace all, it will add that part of the url to the beginning of all the cells thus turning it into a URL for you. Super easy and generally pretty quick depending on how many rows you have - I have done this with tens of thousands of rows and more.

How can I SUM alphanumeric values in Google Sheets?

It's not the best system but I've been using ImportXML to pull in YouTube view counts for my videos so I can keep track. I knew at some point YouTube would make a front end change that would break this. So now recently instead of just the number inside of the DIV I am referencing they are always showing the word "views". So here's what I'm using now
=IMPORTXML("https://www.youtube.com/watch?v=qXnr03IIPTI","//div[#class='watch-view-count']")
This will output "300,000 views" (or whatever the current view count is)
Before they added the word "views" in this DIV I was able to add up this column. So I added another column to strip out the text.
(where G7 is the cell containing the above value)
=SUBSTITUTE(G7, "views", "")
I thought for sure I would then be able to run a SUM on this column but alas the SUM is 0. I believe this is something Excel would be able to deal with.
Any ideas here?
Bonus points if you watch the video :)
If the result is in G7, use formula:
=JOIN("",REGEXEXTRACT(G7,"([0-9]+),([0-9]+),?([0-9]+)?"))*1
it will convert string "300,000 views" into number. It'll handle bigger numbers, like: 1,368,142 views. This formula replaces commas because in some countries comma is used as sepatator integer and decimal part of number.
You can convert it to a value:
=VALUE(REGEXREPLACE(IMPORTXML("https://www.youtube.com/watch?v=qXnr03IIPTI","//div[#class='watch-view-count']")," views",""))
or
=VALUE(REGEXREPLACE(IMPORTXML("https://www.youtube.com/watch?v=qXnr03IIPTI","//div[#class='watch-view-count']"),"[, views]",""))
if you really want the commas etc, wrap the final amount back into a text at the very end if you want such as =TEXT("FINAL SUM","#,#")
Try this:
=REGEXEXTRACT(IMPORTXML("https://www.youtube.com/watch?v=qXnr03IIPTI","//div[#class='watch-view-count']"), "[0-9]*\,[0-9]+[0-9]+")

Resources