I have this sheet Make a copy with more than 50,000 rows in A2:A
The ask
In a single formula, I want to concatenate them with | in a single cell without spaces in between.
Any help is greatly appreciated.
best you can do:
=INDEX(QUERY("♦|"&A2:A&"|♦";;9^9))
Related
I have a log file with three fields, the first two are userIDs and the third is an item description. Can I use a single formula to Split the text, format the first 2 items, and leave the 3rd alone?
Sample Data:
<#!9812391203019>; <#!98120319283> ; Short Description
Formula Currently used:
=ARRAYFORMULA(REGEXEXTRACT(TRIM(SPLIT(A3,";")),"[0-9]+"))
This works to extract the userID from the unneeded in the first two columns but will only give me numbers for the third.
Previous Formula was within the REGEXEXTRACT but it left the unneeded "<#!" and ">" in the columns which I wanted to remove.
Any help and suggestions would be appreciated! Thanks in advance!
Does this work?
=Split(RegexReplace(A1,"[<#!>]",),"; ",0)
try:
=INDEX(IFERROR(REGEXREPLACE(TRIM(SPLIT(A1:A5, ";")), "[#!<>]", )))
I'm working in Google Sheets. I have a few hundred cells that contain text and numbers. The cells contain employee names and their ID#s. I want to extract the ID#s and compile them into one list. I have the formula below that will let me complete the task, but only for one cell, not for a range of cells (even if I select a range and add it to the formula):
=transpose(split(regexreplace(regexreplace(A1,"\s\d+\s"," "),"[^\d\.]"," ")," "))
For example, cell A1 would contain, "Tammy - 123456, Bob - 654987, Mike - 321456" and repeat similar until you get to something like cell DT75 "Marcus - 35768, Bruce - 95126, Lisa - 789123". Some cells in the sheet are blank. The above formula will give me the ID#s from A1 in their own cells:
123456
654987
321456
I'd like to get one column of all the ID#s in the sheet that I could then copy and paste into a completely different proprietary database. Am I coming at this the wrong way? Is a script a better angle?
Since you want your original range to be multi-column, you could try a slightly modified version of player0's formula, like this:
Use CONCATENATE to put all data in a single string.
REGEXREPLACE to remove everything but the numbers from your string.
SPLIT to divide your string into several cells, blank space being the separator.
FLATTEN put all resulting values into a single column.
=FLATTEN(SPLIT(REGEXREPLACE(CONCATENATE(A:DT), "[A-Za-z-,]+", )," "))
try:
=INDEX(FLATTEN(SPLIT(QUERY(REGEXREPLACE(A1:A, "[A-Za-z-,]+", ),,9^9), " ")))
for multi-column:
=INDEX(FLATTEN(SPLIT(FLATTEN(QUERY(REGEXREPLACE(A1:C, "[A-Za-z-,]+", ),,9^9)), " ")))
I have a spreadsheet with a column of cells that each cell contains multiple emails. I want to create a formula that will give me a total of all emails in each cell.
Cell A1 Contains ("email#msn.com,email#gmail.com,email#fun.com")
I'd like help in figuring out how to count the number of emails in A1 which would be "3". Can this be done by counting the # sign?
I have a very large spreadsheet with thousands of emails that I need to total.
I have tried CountA, Count, Search but can't figure this out.
Thanks in advance for any help
You could try:
=LEN(A2) - LEN(SUBSTITUTE(A2, "#", ""))
This compares the length of the original cell to the length with all # synbols removed, to infer the number of # symbols.
I'd like to achieve what's in the Desired Output column in the image below. I need to take what's in row 1 (id1, id2, etc.), add ":" to that, then concatenate it with the values under each of the Field columns, add "|" to each ID-Value pair, and get that all together into one cell. I need the formula to also work for empty cells, as the number of fields to concatenate together is dynamic.
So far I've tried a big CONCATENATE formula in one cell, but I can only get it to work for as many non-blank cells as I include in the formula.
Thanks in advance!
google-sheets
Use JOIN:
=arrayformula(join("|",filter($B$1:$E$1& ":" & B2:E2,B2:E2<>"")))
excel-formula
Use TEXTJOIN
=TEXTJOIN("|",,IF(B2:E2<>"",$B$1:$E$1 & ":" & B2:E2,""))
This will be an array formula and must be confirmed with ctrl-Shift-Enter instead of Enter when exiting edit mode.
Kind people smarter than myself:
I want to convert this formula in Google Sheets:
=SUM(L3:O3,R3:U3)
into an array formula for rows 3 - 24. Any help or suggestions appreciated, thanks!
An array formula is created by entering the formula and then using
ctrl + shift + enter
Does this formula work for you:
{=SUM(L3:O24,R3:U24)}
You'll notice than an array formula will automatically add the {} to the front and back of the formula.
Use +
=ARRAYFORMULA(L3:O3+R3:U3)
or
=ARRAYFORMULA(L3:O24+R3:U24)