Google Sheets lstrip(), rstrip() equivalents? - google-sheets

What's the best way to turn
*3.32*
into
3.32
In Google Sheets? I want the string to go into a function to convert it into a number.

I wound up using the SUBSTITUTE function.
=SUBSTITUTE("*3.32*","*","")

Related

Very Specific Filtering in Google Sheets

I am making a calculator in Google sheets and I would like to find a formula or script or something that will allow me to read the value of a certain square and add the formula "=sum(C5:C9)" or "=product(C5:C9)" or whichever depending on what the person puts in C4. Not sure if this is possible in google sheets (without custom code), but if it is, that would be great!
try:
=IF(C4="*"; PRODUCT(C5:C9); SUM(C5:C9))

Use a Dynamic Range for Chart Google Sheets

Is there any way to do this other than using an API?
It seems like you can't specify the range of a chart with a formula.
I've tried name ranges too - does anyone know a work around?
unfortunately this one is not possible. google sheets (up to this date) does not support formulas in input field of charts. the only thing you can do is to query/filter your dataset on some separate hidden sheet and then construct chart from there.

TEXT() equivalent for strings in Google Sheets?

In Google Sheets, TEXT() can format numbers but I cannot find one for strings.
For example,
TEXT(012345678,"00-000-0000")
formats the number into
01-234-5678
I want to do a similar thing but with strings, like:
AABCDEEEF to AA-BCD-EEEF
I guess using several functions can yield the same result but I want to know if there is a simple method, like TEXT().
I believe your goal as follows.
You want to convert AABCDEEEF to AA-BCD-EEEF.
How about this sample formula?
Sample formula:
=ARRAYFORMULA(REGEXREPLACE(A1:A5,"(.{2})(.{3})(.{4})","$1-$2-$3"))
In this case, I used REGEXREPLACE.
When you want to use only one cell, please use REGEXREPLACE(A1,"(.{2})(.{3})(.{4})","$1-$2-$3")
Result:
Reference:
REGEXREPLACE

Using LOOKUP (2,1/ function in Google Sheets

Using function
=LOOKUP(2,1/((B8>=A1:A5)*(B8<=B1:B5)),C1:C5)
to lookup a value between two numbers doesn't seem to work in Google Sheets while in Excel it does. Does anyone know the alternative to this function in Google Sheets, please?
You need to use ARRAYFORMULA:
=ARRAYFORMULA(LOOKUP(2,1/((B8>=A1:A5)*(B8<=B1:B5)),C1:C5))

How to convert currency in Google Docs Spreadsheet cell?

Okay I have a cell with Russian Roubles and want to convert them into US Dollars. What is the formula? I tried to find some keywords with =something (currency,finance,convert,dollar,double,ruble and much more) but found nothing.
There are certain function available in Google Spreadsheets to interact with other Google services such as Finance.
To get the realtime exchange rate between currencies and set up conversion you could follow these steps:
Get the exchange rate between currencies in a cell, or use it directly in a formula using the function: GoogleFinance("CURRENCY:EURUSD"). The format is GoogleFinance("CURRENCY:<from-currency><to-currency>")
Use it in a formula: =C4*GoogleFinance("CURRENCY:EURUSD")

Resources