Which formula can I use to remove the currency sign?
Anything smarter than: REPLACE(value,0,1)?
Your question is way too vague.
Having said that, let's cover different conditions
Cell as TEXT =C1*1
Cell as NUMBER =N(C2)
Raw Value =("$-123.55")*1
Try the following
=SUBSTITUTE(value, "$", "")
Related
Hello stackoverflow i want to ask about how to remove those ,00000 (on screenshot above) im using multiple formula and "Format > Number > option" doesnt work for me
Thank you
You can use =ROUND() or =ROUNDDOWN() function to remove the decimal.
Your AVERAGEIF formula should look like this:
=ROUND(AVERAGEIF($B$13:$B;"Pragmatic Play";$E$13:$E))
OR
=ROUNDDOWN(AVERAGEIF($B$13:$B;"Pragmatic Play";$E$13:$E))
Example:
References:
ROUND
ROUNDDOWN
For currency values you can also use =DOLLAR() (depending on spreadsheet's local setting) which allows you do determine the number of decimals:
=DOLLAR(AVERAGEIF($B$13:$B;"Pragmatic Play";$E$13:$E);2)&" (other things)"
I am trying to build a URL in a cell (google sheets) which will get some of its values from different cells. I have tried using all different ways I can think of like concatenate, Join, & etc but the problem is that the URL has some curly brackets and " as a requirement and that breaks the formula:
URL Example
https://katang.io/?t_pid=1&t_extra={"Source":"stackoverflow","Type":"email","Stategy":"banner"}
So I need "Source":"stackoverflow" to be dynamic
so for example "Source":"Get Value from Cell A1"
Any Help or guidance will be much appreciated
Things to note:
"" makes a literal " character in a string, so you'll have to double up every one.
The & is the concatenation operator in a formula, so you can use that to get values outside of your string.
Therefore, this formula should work:
="https://katang.io/?t_pid=1&t_extra={""Source"":"""&A1&""",""Type"":""email"",""Stategy"":""banner""}"
I have a Google Sheets cell with content like this: £5,300.23 and I can't find a simple way to reformat it as numbers.
My current solution is in three steps:
remove the currency sign (= substitute(A1, "£", "")),
paste-special into a new column,
then format the column as 'number'.
Is there a better way?
Use Value on the result of substitute:
=VALUE(SUBSTITUTE(A1,"£",""))
you can do simply:
=SUBSTITUTE(A18, "£", )*1
and arrayformula would be:
=ARRAYFORMULA(SUBSTITUTE(A18:A20, "£", )*1)
Currently I have such formula:
COUNTIFS(B3:B36,"16",E3:E36,"01")
Would it be possible to turn these ranges B3:B36 and E3:E36 into variables, like B'start_cell_value':B'stop_cell_value'.
The whole thing would look like:
=COUNTIFS(B'start_cell_value':B'stop_cell_value',"16",E'start_cell_value':E'stop_cell_value',"01")
start_cell_value and stop_cell_value are just some numbers stored in a separate cell. This would help, since changing numbers in those cells only would also change everything in the formula and that's exactly what I want.
I have tried to combine a numeric value from other cells with a letter to make a valid cell name but it doesn't seem to work or it just throws a reference error.
Any ideas would be appreciated.
If you have the start_cell_value in cell A1 and the stop_cell_value in A2 then try this formula:
=COUNTIFS(INDIRECT("B"&A1&":B"&A2),"16",INDIRECT("E"&A1&":E"&A2),"01")
with Named Ranges you can have it even exact:
=COUNTIFS(INDIRECT("B"&start_cell_value&":B"&stop_cell_value), "16",
INDIRECT("E"&start_cell_value&":E"&stop_cell_value), "01")
=COUNTIFS(INDIRECT("B"&A1&":B"&A2), "16",
INDIRECT("E"&A1&":E"&A2), "01")
Here's my next challenge, and it's related to the previous one (found here: This works for one cell - now how can I apply it to a range?).
I've ended up with a godawful ugly formula for conditional formatting, and somehow (perhaps by dumb luck) it seems to work...
=OR(ARRAYFORMULA(IF(ISNUMBER(SEARCH($B$18,D7)),SIGN(SEARCH($B$18,D7)),IF(ISNUMBER(SEARCH(SPLIT($B$19,","),D7)),SEARCH(SPLIT($B$19,","),D7)))))
It returns true for any single target cell (D7 in this example), checking whether it contains either the string in B18 or one of two or more string values, separated by commas, in B19.
As with the previous scenario, I can't work out how to turn this into a formula (array formula?) which I can apply to a range (D3:D12) and count how many cells meet the criteria.
Or maybe the better question is, what would be the correct way to tackle this in preference to my Frankenstein's Monster of a kludged-up formula quoted above!
Any and all insights appreciated :)
Assuming the values in B19 are separated by a comma, followed by a space, try:
=sum(ArrayFormula(--(REGEXMATCH(D3:D12, B18&"|"&SUBSTITUTE(B19, ", ", "|")))))
If there is no space after the comma use "," instead of ", ".
If you want the match to be case-insensitive, try:
=sum(ArrayFormula(--(REGEXMATCH(D3:D12, "(?i)"&B18&"|"&SUBSTITUTE(B19, ", ", "|")))))
See if that works?