I am trying to build some concatenate functions to work with HTML.
The functions are almost there, but when I copy the result from Google Sheets the formula doesn't pick up the dynanic value from another cell:
=CONCATENATE("<div class=""audio-container"" style=""display:flex;justify-content:center;align-items:center;""><audio controls><source src="",B3,"" type=""audio/mpeg""></source></audio></div>")
FORMULA OUTPUT: <div class="audio-container" style="display:flex;justify-content:center;align-items:center;"><audio controls><source src=",B3," type="audio/mpeg"></source></audio></div>
ISSUE: The B6 CELL reference containg the string download.mp3 is not inserting
I think it is something to do with the HTML double quotes, even though they seem to output correctly, but the cell reference seems to be ignored and is being recognized as a string instead.
You were almost there. I got:
=CONCATENATE("<div class=""audio-container"" style=""display:flex;justify-content:center;align-items:center;""><audio controls><source src=""";B1;""" type=""audio/mpeg""></source></audio></div>")
The output I get is: <div class="audio-container" style="display:flex;justify-content:center;align-items:center;"><audio controls><source src="download.mp3" type="audio/mpeg"></source></audio></div>
You were right, the problem was in the double quotes. You had to add a third one. Look at the part ...src=""";B1;""" type=.... That fixed everything.
Related
emails
vera#mail.com
estebangarrido#mail.c
hurtado#mail com
jmariano2mail.com
How can I pass a fuction which correct all domains to #mail.com. I know I have to use =RIGHT(,9) but when you reach the last error it does not apply
Try below formula-
=ArrayFormula(IF(A2:A="",,QUERY(SPLIT(SUBSTITUTE(SUBSTITUTE(A2:A,"mail","|"),"#",""),"|"),"select Col1",0)&"#mail.com"))
This should also work.
=INDEX(IF(LEN(A2:A),QUERY(SPLIT(SUBSTITUTE(SUBSTITUTE(A2:A,"mail","|"),"#",""),"|"),"select Col1")&"#mail.com",""))
Answer
The following formula should produce the results you desire. It assumes that the data you provide is in cells A2:A5 of your spreadsheet. If this is not the case, adjust the A2:A5 portion of the formula appropriately.
=ARRAYFORMULA(REGEXREPLACE(A2:A5,"[#|2].*","#mail.com"))
Explanation
This formula uses REGEXREPLACE to get rid of all rogue characters and replace them with #mail.com. The first argument of REGEXREPLACE is the string to be evaluated. In this case, that is the range from A2 through A5. The second argument is which characters to look for. In this case that is all characters (done using .*) that follow either an at-sign or a numeral two (done using [#|2]). The third argument is which new string to replace the found characters with. In this case that is #mail.com, the correct domain without typos.
The REGEXREPLACE is wrapped in =ARRAYFORMULA because normally REGEXREPLACE can only be used with a single cell rather than a range of cells.
Please note that this solution relies on the assumption you stated that "Everything before # or 2 is correct."
A user pastes in a value to see if there is a full or partial match. I need to do a vlookup and keep removing characters until there is a match. A full match of something like test1.test2.test3 is no problem because it's a full match to my list. But if someone pastes in something like test1.test2.test3.test4, I need to remove a character one at a time from the end until there is a match. So in this example, it would match test1.test2.test3 and return that result.
Conceptually I see this as a for loop that counts the characters using len, using left to remove the number of characters from the end based on the current iteration, and doing vlookups until returning the value when true. But I'm not sure how to do this in Google Sheets.
This formula will give you the matching value that was found in the data(i.e. test1.test2.test3)
=FILTER([column_with_data], REGEXMATCH([cell_with_pasted_value_to_look], [column_with_data]))
This formula will give you the matching data and the cell reference where it was found (i.e. test1.test2.test3 # $A$4)
=FILTER([column_with_data], REGEXMATCH([cell_with_pasted_value_to_look], [column_with_data]))&" # "&CELL("address",INDEX([column_with_data],MATCH(FILTER([column_with_data], REGEXMATCH([cell_with_pasted_value_to_look], [column_with_data])),[column_with_data],0),1))
Simply copy & paste any of the above formulas next to the cell where users paste a value to look. Then, replace the two references in the square brackets [ ] with the proper coordinates in your sheet:
replace [column_with_data] with the coordinates of the column containing all the stored data (i.e. A1:A)
replace [cell_with_pasted_value_to_look] with the absolute ($col$row)coordinates of the cell where users paste the value to look (i.e. $B$1)
Would it be a problem to download the data from Google sheets, transform the file type to use the for loop in another software, and re-upload? I think your idea for a for loop would work.
It might be quicker if this is a long term project, but not so great if the client is continually monitoring/uploading.
when importing info from cell K24 in a google sheet called "Kaila Crowe-Weekly Timesheet" into a a different google sheet. when i use =IMPORTRANGE("https://docs.google.com/spreadsheets/d/1km-rgr3fWQpnxV_IOjvfBeWYHwcSMKGCQ5vI3DUkh-Y/edit#gid=0","Kaila Crowe-Weekly Timesheet!D10:F10"). why would I be running into this error if all info is correctly labeled?
I think I found the issue. When referencing a sheet that has spaces in the name, you have to surround the name in single quotes. So your range should look like this:
'Kaila Crowe-Weekly Timesheet'!D10:F10
Which you then put inside the double quotes of the formula:
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1km-rgr3fWQpnxV_IOjvfBeWYHwcSMKGCQ5vI3DUkh-Y/edit#gid=0", "'Kaila Crowe-Weekly Timesheet'!D10:F10")
See if that works.
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 keep getting an error while using the IMPORTRANGE formula:
=importrange(“1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc”, “Sheet1!A:B”)
I changed the name of my sheets several times to make sure everything matches but see a:
Formula parse error
and I am not sure what I am doing wrong. The original sheet has several tabs as well.
Can you see where the error is?
This worked for me:
=importrange(“1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc”; “Sheet1!A:B”)
Maybe try it with a semicolon
Add the link format
eg
=importrange("https://docs.google.com/spreadsheets/d/1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc","Sheet1!A:B") this should fix it
One other issue that can prevent import range from working is leading or trailing space in your sheet name. Make you check the sheet tab and clean out any leading or trailing spaces or your formula won't work. :-)
I burned an hour reading this thread and recreating my formula over and over again before I finally found the issue.
You have it as Sheet1!A:B, but you are missing the single quotes to identify the sheet name.
It should be 'Sheet1'!A:B instead.
The full formula is below:
=importrange(“1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc”, “'Sheet1'!A:B”)
Make sure the sheet you're trying to import from is saved as a google sheet. I was trying to import an .xls file into a google sheet, and it wouldn't work. I re-saved the sheet as a google sheet and it fixed the problem immediately.
Problem
This formula does not work
=importrange(“1uUbz2HAzgwBwY3zMXqLJM_Z8qVQZHNP0aNHceTc”,“Sheet1!A:B”)
Reason why
You use curly double quotes “ ” instead of straight double quotes " "
SOLUTION
Change the quotes from curly to straight
=importrange("1uUbz2HAzgwBwY3zMXqLJM_Z8qVQZHNP0aNHceTc","Sheet1!A:B")
Be careful
If you have different locale you must also change , to ;