I have a worksheet with 2 tabs - Customers, Data. All tabs have a list of customers. The list on Data is a subset of all Customers. I need to pull available address information for Customers from Data.
I need the Address1-3 columns in Data to be joined using <br> and placed in the Address column in Customers. The situation seems similar to this other SO thread joining results into a single string, however those values are all vertical in different rows and the difference here is the values are horizontal in different columns.
Not working:
=TEXTJOIN("<br>",1,VLOOKUP(A2,Data!A:D,{2,3,4},FALSE))
=TEXTJOIN("<br>",1,QUERY("Data!A:H","SELECT B,C,D WHERE "&A2&"="&Data!A:A))
=TEXTJOIN("<br>",1,FILTER(Data!A:D,A2))
Google Sheets example ready for copy/fiddle.
Example Data - the names have been changed to protect the innocent
Account
Address1
Address2
Address3
City
State
Zip
Country
Facebook
Lorem
Ipsum
Dolor
Menlo Park
CA
94025
United States
Amazon
Sit
Amet
Consectetur
Seattle
WA
98109
United States
Apple
Adipiscing
Elit
Ut
Cupertino
CA
95014
United States
Microsoft
Ultricies
Velit
Eu
Redmond
WA
98052
United States
Google
Interdum
Bibendum
Proin
Mountain View
CA
94043
United States
Example Customers - the names have been changed to protect the innocent
Account
Address
City
State
Zip
Country
Facebook
Walmart
Amazon
Home Depot
Apple
CVS
Microsoft
BMW
Google
Toyota
...
Expected Output
Account
Address
City
State
Zip
Country
Facebook
Lorem<br>Ipsum<br>Dolor
Menlo Park
CA
94025
United States
Walmart
Amazon
Sit<br>Amet<br>Consectetur
Seattle
WA
98109
United States
Home Depot
Apple
Adipiscing<br>Elit<br>Ut
Cupertino
CA
95014
United States
CVS
Microsoft
Ultricies<br>Velit<br>Eu
Redmond
WA
98052
United States
BMW
Google
Interdum<br>Bibendum<br>Proin
Mountain View
CA
94043
United States
Toyota
Your formula is fine, you just have to wrap it in an ArrayFormula():
=ArrayFormula(IFNA(TEXTJOIN("<br>",1,VLOOKUP(A2,Data!A:H,{2,3,4},FALSE))))
You need to FILTER() then join. Try-
=IFERROR(MAP(A2:A14,LAMBDA(x,JOIN("<br>",FILTER(Data!B2:D,Data!A2:A=x)))),"")
Try this:
=ARRAYFORMULA(JOIN("<br>",QUERY({Data!A1:H6},"SELECT Col2,Col3,Col4 WHERE Col1 = '"&A2&"'",0)))
Edit: Harun24hr has the better answer, this will not autofill down.
Related
I am trying to import data from several sheets into one, But they need to come between data in other cells.
So i have:
Fixed text data 1
=FILTER('Car Parks'!A:AC, NOT(ISBLANK('Car Parks'!A:A)))
=FILTER('Chapter 8'!A:AC, NOT(ISBLANK('Chapter 8'!A:A)))
=FILTER('Production'!A:AC, NOT(ISBLANK('Production'!A:A)))
=FILTER('CSAS'!A:AC, NOT(ISBLANK('CSAS'!A:A)))
Fixed text data 2
However, each of the FILTER functions will return a #REF as it cannot overwrite the other FILTER functions or the fixed text data.
Each filter function works correctly as long as there is not too many rows required.
Is there a straight forward way to allow each of these FILTER functions to add rows until they are completed, before the next filter function or fixed text data?
Context:
Used to generate a quote document.
Each Filter function imports shift timings for different sectors on a job
Fixed text data 1 is the initial data such as client details
Fixed test data 2 in the terms and conditions of the quote
you could append the filters and fixed text 2 to keep it dynamic. try:
={IFNA(FILTER({'Car Parks'!A:AC;'Chapter 8'!A:AC;Production!A:AC;CSAS!A:AC},{'Car Parks'!A:A;'Chapter 8'!A:A;Production!A:A;CSAS!A:A}<>""));"TERMS AND CONDITIONS";"Lorem ipsum dolor sit amet. Rem laudantium reiciendis eos error quia aut autem molestiae aut temporibus magnam!"}
My data set looks like this and it's all in Column A going straight down with no deviation from this formatting:
Let's Pretend Parties
317 Jenkins St
Grapevine TX 76051 USA
Let's Pretend Parties
3000 Grapevine Mills Pkwy
Grapevine TX 76051 USA
Tip Toes Holland
60 E. 8th St
Holland MI 49423 USA
Tugboat and The Bird
318 Park Avenue North
Winter Park FL 32789 USA
Overall Fun
3429 West 7th St
Fort Worth TX 76107 USA
Bad Kitty Kids
255 96th St
Stone Harbor NJ 8247 USA
Is it possible to move the the address into column B? Is it possible to move the locations into Column C?
i.e.
Column A: Column B: Column C:
Let's Pretend Parties 317 Jenkins St Grapevine TX 76051 USA
Let's Pretend Parties 3000 Grapevine Mills Pkwy Grapevine TX 76051 USA
Or, if this isn't possible, to just move them to each of their own columns but lined up and I can manually delete blank spaces?
I'm totally at a loss on this as I'm a Google Sheets newbie.
Thanks!
I'm a complete noob to Google Sheets. I already tried googling solutions and tried using a query with skipping--but I couldn't get it to neatly line up and it kept doubling/tripling stuff from Column A.
Appreciate anyone who answers. Thank you so much!
try:
=QUERY(A1:A10; "skipping 3"; )
Another solution:
=ArrayFormula(XLOOKUP(SEQUENCE(ROUNDUP(COUNTA(A:A)/3),3),SEQUENCE(COUNTA(A:A)),FILTER(A:A,A:A<>""),))
try this out:
={QUERY(A:A, "SKIPPING 3"),QUERY({"";"";A:A},"SKIPPING 3 OFFSET 1"),QUERY({"";A:A},"SKIPPING 3 OFFSET 1")}
The goal is to create an arrayformula that looks over two separate columns and returns a SUM if it matches a certain string.
Here's an example table:
Feature
Status
Description
API
Completed
Lorem ipsum
Database
In review
lorem ipsum
Server
Backlog
lorem ipsum
Load Balancer
Completed
lorem ipsum
DB
QA
lorem ipsum
LB
Completed
lorem ipsum
Data base
Backlog
lorem ipsum
The first thing I wanted to pull, was the total number of Data base entries, regardless of the spelling. Which works
For that I used:
=ArrayFormula(Sum(CountIfs(A2:A8, {"db","data b*","database"})))
On that note: I know that's not scalable to keep adding different string variations, it's a one-off-scenario.
What I'd like to return is "For all Database entries, return the SUM where status = Completed". Which would be 0 in this scenario.
I tried adding another arrayformula into the above but I'm not sure how to reference only those items found in the previous formula? If that makes sense?
To visualise the confusing explanation:
=ArrayFormula(Sum(CountIfs(A2:A8, {"db","data b*","database"}) AND "WHERE STATUS IS COMPLETE"))
Could someone point me into the right direction? I'm happy to read through any documentation (only started looking at excel formulas today for the first time)
try:
=SUMPRODUCT(B:B="completed", REGEXMATCH(A:A, "(?i)database|db|data b"))
I have a cell A2 containing following Text string in google sheet.
UAE Vacancy - Collections Field agents. Location - Dubai, Abu Dhabi Work profile- banking collections background outdoor field. Age- Below 30 years. Salary - AED 5500 + quarterly incentive and yearly bonus. Minimum 1-year of experience in collections is required in the UAE Banking industry. Candidates meeting the criteria, share their resume on
test#test.com
with subject 'Field agent' Reference -
from UAE Jobs #uaejobs #bankjobs #collectionagency #dubaijobs #hireinuae
Now in Cell B2 I want to extract salary which is 5500 a numeric value. i tried to figure it out with is number but it is not working.
How can i extract numbers in next cell.
Thanks
Try:
=VALUE(REGEXEXTRACT($A2, "[0-9]{3,}"))
This will extract the first number with 3 or more digits.
See on Google Sheets
I am fairly new to Google sheets, and essentially what I am trying to do is remove all non-duplicate values that do not exist or is listed in another sheet or row - and also store the non-duplicate values somewhere else
In my example sheet here, I am trying to only keep the Alcohol names that are listed in column G
So in my case, I only want to keep the following records:
Alcohol Name Alcohol Type Origin
Martell Cognac France
Captain Morgans Rum Jamaica
Wray & Nephew Rum Jamaica
Hennessey Cognac France
Barcardi Rum Cuba
Courvoiser Cognac France
Famous Grouse Scotch Scotland
Jack Daniels Whisky USA
Grants Scotch Scotland
Ciroc Vodka France
I also want to keep any that did not appear in the list in a separate table like this:
Alcohol Name Alcohol Type Origin
Russian Standard Vodka Russia
Southern Comfort Bourbon USA
Ciroc Whisky France
At the moment I am having to manually check a longer list one by one and it is taking lot of time and my arm hurts..
If someone can please help me with sorting it such that it looks like this, would be great! I don't know if there are formulas we can use
Use this formula to only keep the Alcohol names that are listed in column G
=QUERY(A1:C," where A matches '"&TEXTJOIN("|",1,G2:G)&"' ",1)
To order them use
=QUERY(A1:C," where A matches '"&TEXTJOIN("|",1,G2:G)&"' order by A",1)
Use this to keep any that did not appear in the list in a separate table.
You see, you only put not in the formula
=QUERY(A1:C," where not A matches '"&TEXTJOIN("|",1,G2:G)&"' ",1)