GoogleSheets - Count characters in cell - google-sheets

I have the following cells with emojis.
As you can see I would like to get the value of these emojis as numeric.
I tried using a regex: =len(regexreplace(A2,"[^\⭐️]",""))
However, I do not get the desired result.
Any suggestions what I am doing wrong?
Find below the link to the example spreadsheet:
Link to the Example Spreadsheet
I appreciate your replies!

added formula to your sheet. Please test it out:
=MAKEARRAY(COUNTA(A2:A),1,LAMBDA(r,c,LAMBDA(ax,IF(ax=0,"-",ax))(LEN(REGEXREPLACE(INDEX(A2:A,r),"[^⭐]",""))+ LEN(REGEXREPLACE(INDEX(A2:A,r),"[^💥½¾]",""))/2)))
-
ALTERNATE FORMULA
=BYROW(IFERROR(INDEX(SPLIT(REGEXREPLACE(A2:A, "(.)", "$1|"), "|"))),LAMBDA(ax,IF(ax="",,LAMBDA(zx,IF(zx=0,"-",zx))(COUNTIF(ax,"⭐")+COUNTIF(ax,"💥")+IF((COUNTIF(ax,"½")>0)+(COUNTIF(ax,"¾")>0),0.5,)))))
-

Related

Extract Substrings using importxml in google sheets

Using IMPORTXML in google sheets. I want to extract part of the result into one cell.
=IMPORTXML(B1,"//div[#class='orca-rating SwtJyda color-yellow tbody-6']/span")
I got the result spread over several columns. B8:F8
The inspect element is like this. I only want the value "2". It is in cell B8.
I think this can be done using substring-after. But I could not get the correct result.
In your situation, how about the following samples?
=REGEXREPLACE(JOIN("",IMPORTXML(B1,"//div[#class='orca-rating SwtJyda color-yellow tbody-6']/span")),"[^0-9]","")
=REGEXEXTRACT(JOIN("",IMPORTXML(B1,"//div[#class='orca-rating SwtJyda color-yellow tbody-6']/span")),"\((.*)\)")
References:
REGEXREPLACE
REGEXEXTRACT
I use this formula. That works too.
=INDEX( IMPORTXML(B1,"//div[#class='orca-rating SwtJyda color-yellow tbody-6']/span"),3)
But tanaike's formula is very good.

Conditional formatting, if A2<B2 and D2<E2 on Sheet1, then cell is green on Sheet2

I'm trying to do as titled.
Product on Sheet2 will only be coloured green if both A2<B2 and D2<E2 on Sheet1.
If one of the criteria isn't fulfilled, the product will not be green.
Here's the example sheet.
I tried this formula, but either there's no effect, or I get an invalid code error.
=AND(INDIRECT("'Source Data'!A2<'Source Data'!B2","'Source Data'!D2<'Source Data'!E2")
Is there something wrong with the formula? Thanks in advance.
You asked:
Is there something wrong with the formula?
Yes. You are using INDIRECT the wrong way. Please read more about INDIRECT
For your given data you can use
=AND(INDIRECT("'Source Data'!A"&ROW()-2)<INDIRECT("'Source Data'!B"&ROW()-2),
INDIRECT("'Source Data'!D"&ROW()-2)<INDIRECT("'Source Data'!E"&ROW()-2))

Google Spreadsheet - CONCATENATE with a twist Formula

I have a Google Spreadsheet where I want to add a " - " if there is a subtitle. If there is not a Subtitle, I want to leave it out. On a technical note: Both columns contains text only and can be any text as well.
My current formula is like this:
=CONCATENATE(B87; " - ";C87)
I've been looking and trying formula's, but none working so far. Does anyone have a solution? Thank you kindly in advance!
delete range A87:A and use in A87:
=ARRAYFORMULA(IF(C87:C=""; B87:B; B87:B&" - "&C87:C))

Search for string with VLOOKUP in Google Sheets

Trying to find a particular string in a google sheet column (column A) and return the value of the cell directly to the right (column B). If tried the following, but keep getting a Formula parse error. Please advise:
=VLOOKUP(“Assessment Guide - AWG”, A16:B120,2,FALSE)
That formula looks right to me, but if you could take a screenshot of how you wrote the formula that would be helpful. Usually formula parsing issues happen when you use a semicolon instead of a comma or have an extra parenthesis or a quote in the wrong place.

Google Sheets formula not working

Google Sheets is saying there is a parse error.
=ROUNDUP(B9/B3)&ʺ:ʺ&ROUNDUP(B3/B9)
What's wrong with it?
I think it may just be the wrong type of double inverted commas. Try copy/pasting the following:
=ROUNDUP(B9/B3)&":"&ROUNDUP(B3/B9)
For comparison:
=ROUNDUP(B9/B3)&ʺ:ʺ&ROUNDUP(B3/B9)
Seconded, the commas are the issue here!
I re-typed your exact formula and the cell generated the correct solution:
=roundup(B9/B3)&":"&roundup(B3/B9)

Resources