replacing character in google sheet [duplicate] - google-sheets

This question already has answers here:
Substitute first X occurrences
(2 answers)
RegexReplace the nth occurrence of a string of underscores
(1 answer)
Reference - What does this regex mean?
(1 answer)
Closed 4 months ago.
I am wondering in google sheets if it is possible to replace the second character.
ex. abc123/def123/ghi123
I want to replace the second slash after def123 to a colon. So I want it shown as abc123/def123:ghi123
Thanks!

Related

Replace cells content based of different conditions [duplicate]

This question already has answers here:
How can I create a conditional that puts a value in one cell if there is certain value in another cell in Google Sheets
(1 answer)
Frustrating Formula - Help Needed with Google Sheets formula/method
(2 answers)
Closed 4 months ago.
imagine I have a column with a list of brand, how can I search for different brand name and replace their name with anoter label automatically?
If it was only 1 condition, I could do
IF(REGEXMATCH(LOWER(B27), "nike"), "Sport Shop", B27)
but what if I have 2 or more conditions-label to apply?
Here is an example:
Ideas?
Thanks

Nesting SUBSTITUE function with MULTIPLY parameter not working in Google Sheets [duplicate]

This question already has answers here:
ultimate short custom number formatting - K, M, B, T, etc., Q, D, Googol
(3 answers)
Closed 7 months ago.
I currently have a sheet with numbers displayed in the "K,M,B" format (e.g: 1.2K, 5M, 1.3B).
And I am currently trying to make a function that converts this to the numerical values on a separate sheet.
For example, 1.2k would be displayed as 1200 and so on.
Currently I have:
=SUBSTITUTE(Shorts!B2,"K","")*1000
However, I would also like this SUBSTITUTE functions to handle the case for M (million) and B (billion) so I can drag the cell down the column.
But when I add more multiplications to the nested functions
=SUBSTITUTE(SUBSTITUTE(Shorts!B2,"K","")*1000,("M","")*1000000
it doesn't seem to work and I get a formula parse error.
Any guidance would be much appreciated.
try:
=INDEX(IF(REGEXMATCH(A1:A4&"", "M"),
REGEXEXTRACT(A1:A4, "\d+.\d+|\d+")*1000000,
IF(REGEXMATCH(A1:A4&"", "k"),
REGEXEXTRACT(A1:A4, "\d+.\d+|\d+")*1000,
IF(REGEXMATCH(A1:A4&"", "B"),
REGEXEXTRACT(A1:A4, "\d+.\d+|\d+")*1000000000, A1:A4))))

Partial match a range of strings with another range of strings, outputting the partial match [duplicate]

This question already has an answer here:
How to index match an array of cells to see if each one will match? [duplicate]
(1 answer)
Closed 2 years ago.
I want to partial match the following range of strings:
against this range of strings:
and if there is a match, output the original values from the original range:
I've tried nested IFS and VLOOKUPS, which strangely didn't work for me:
=IF(VLOOKUP(""&$B$1&"",E1,1,FALSE)=E1,$B$1,IF(VLOOKUP(""$B$2&"",E1,1,FALSE)=E1,$B$1)
I've also tried:
=SUMPRODUCT(--ISNUMBER(SEARCH(B1:B22,E1)))
Which got close, but it produced only digits for me in the end, when I want the original string from the 1st range I'm using.
I only want to use formulas, not script.
Using your SUMPRODUCT construction and adding "*" before and after the search string and using it inside an index function:
=IFERROR(INDEX($B$1:$B$22,IF(--ISNUMBER(SEARCH("*"&$B$1:$B$22&"*",$E$1:$E$25))=1,ROW($B$1:$B$22),"")),"")
You can use below formula and see if it helps your situation.
=LOOKUP(2^15,SEARCH($B$1:$B$22,E1,1),$B$1:$B$22)
Here 2^15 is a number larger than maximum number of characters that Excel cell can hold.
Note: I am sure about this formula in Excel. However, I have not tested this formula in google-sheets.

How to make cell reference static even after inserting a column? [duplicate]

This question already has answers here:
How to maintain absolute cell address even when deleting ranges?
(2 answers)
Closed 5 months ago.
I want to use the sparkline formula on a fix range("G:P").
Everyday i add another column next to column F into my sheet. So Column "G" becomes "I" and so on. The problem is that the formula does update the range aswell.
=SPARKLINE($G54:BM54)
to
=SPARKLINE($I54:BM54)
Is there a way to prevent that?
You can use INDEX or INDIRECT:
=SPARKLINE(INDEX(54:54;7):BM54;{"charttype"\"column";"negcolor"\"red";"color"\"green";"axis"\WAHR})
or
=SPARKLINE(INDIRECT("$G54:BM54");{"charttype"\"column";"negcolor"\"red";"color"\"green";"axis"\WAHR})

Get cell number of the first empty column [duplicate]

This question already has answers here:
Find the first empty cell in the same column/row
(3 answers)
Closed 5 years ago.
I'm trying to get the first cell that is empty in a column but I don't have an idea how to accomplish that.
For example, I have this column
How can i get for example in A:7 that the first empty cell is 5 (i only get the number)
I tryied this, but is giving me a error
In A7 enter the array formula:
=MIN(IF(A1:A6="",ROW(A1:A6)))
Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key.
EDIT#1:
Here is the Google Sheet equivalent:

Resources