Google Sheets SumIf Formula Parse Error From Quotation Marks? - google-sheets

In column A I have a list of products and one of those products has quotation marks.
In column B I have a list of quantites.
I want to create a SumIf Formular that sums Column B if Column A has the Prodcut Name Quotation Example Name.
The product name looks like this in the cell: "Quotation Example Name" Holiday Shortbread Cookie Pack
I wrote:
=SUMIF(B:B, "A:A=""Quotation Example Name"" Holiday Shortbread Cookie Pack")")"
How can I correctly write the formula to sum that item?

You may try this:
=SUMIF(A:A,"""Quotation Example Name""",B:B)

Related

Google sheets question - filter sum equation

I have a list of email addresses in one sheet (first column).
I have a list of transactions in another sheet with emails and sale amounts.
I am looking for a formula that adds up all the transaction $ sales for any transactions made by the people (emails) in the first sheet.
Any help would be much appreciated!
Your sample data is very limited (only one row matching one person, in fact). But the following formula should work for you. Place it in a new sheet, in cell A1:
=ArrayFormula(IFERROR({"Name","Total"; QUERY(FILTER(Transactions!A2:D,NOT(ISERROR(VLOOKUP(Transactions!A2:A,Tags!A:A,1,FALSE)))),"Select Col2, SUM(Col4) GROUP BY Col2 ORDER BY Col2 LABEL SUM(Col4) '' ")},"No Data"))
This one formula will produce the headers (which you can change within the formula itself as desired) and all results.
FILTER filters in only 'Transactions' data (names through amounts) where the emails are found in the 'Tags' sheet.
Then QUERY returns the name and totals for each match in alphabetical order by name.
If there are no matches, "No Data" will show instead.
If I understood your question correctly!
Try this on the sheet, where you only have emails and wanted to get sum of sales amount
=sumifs(range_whichHasTransaction , range_of_Email_inThat_TransactionsTable , Cell_Reference_ofEmail_forWhich_you_want_sum_the_Transaction_Amount)
it will Look something like this:-
sumifs(TransactionSheet!B:B,TransactionSheet!A:A,Emails!A2)
Reference
SUMIFS

How to concatenate cells conditionally

I have a google sheet with two columns.
The first column has a number or reoccurring reference like xyz.
The second column has a list of names.
I would like to program a formula to concatenate all names in column 2, that have 'xyz' in column 1.
You can use filter to concatenate Name Column where column Countif are not blank, like this:
=textjoin(",",false,filter(B2:B,A2:A<>""))
or if you next just want to get data Name where column Countif are not blank, do like this:
= filter(B2:B,A2:A<>"")

How can I extract the string in a Google Sheets cell when the values are separated by a delimiter?

How would I write a formula in Google Sheets that extracts the following:
I want to grab the 3rd string (0 being first in this example) from column M below, and store that string in column A.
[M2] 2872_TX_USA_Event_Farming Convention_CST_Planned
[M3] 4980_BC_CAN_Campaign_Politics_PST_Active
I want column A to look like this:
[A2] Event
[A3] Campaign
Please try in A2 and copied down:
=regexreplace(mid(M2,13,50),"_.+",)
OR
=index(split(M2,"_"),1,4)

How to join tables using Query or Vlookup

I have 2 sheets
people sheet has
[company first_name last_name full_name address_line1 address_city address_state address_zip address_country telephone email order_id order_date order_time processor order_type order_currency commission campaign_id]
sales sheet has
[DATE PROSPECT NAME EMAIL ADDRESS CONTACT METHOD PRODUCT RESULT NOTES ]
How do I make the report to generate when people.email = sales.EMAIL ADDRESS and display the records only if they match (Not all of sales sheet)
Report fields are
full_name
EMAIL ADDRESS
PRODUCT
commission
Sample File
Please try to use basic formula for joining sheets + query to skip some rows.
Basic formula:
=FILTER({Sales!B14:B,Sales!C14:C,Sales!E14:E, vlookup(Sales!E14:E,{People!B2:B,People!D2:D},2,), Sales!F14:F},Sales!A14:A<>"")
The formula you need:
=QUERY(FILTER({Sales!B14:B,Sales!C14:C,Sales!E14:E, IFERROR(vlookup(Sales!E14:E,{People!B2:B,People!D2:D},2,), "do not show"), Sales!F14:F},Sales!A14:A<>""),"select * where Col4 <> 'do not show'")
How it works
It uses iferror(expression, "do not show") to replace #N/A error with the text "do not show".
Then it uses query to hide rows with value "do not show":
"select * where Col4 <> 'do not show'"
Basic formula and the question is here
Notes about usage:
Sales!B14:B,Sales!C14:C,Sales!E14:E are some columns you need to select first
IFERROR(vlookup(Sales!E14:E,{People!B2:B,People!D2:D},2,) will return column from "People", it is column People!D2:D. Please note that columns Sales!E14:E and People!B2:B are both containing a key, in the sample it is e-mail list.
Sales!F14:F is a column to return next.
filter condition Sales!A14:A<>"" is to skip empty rows from original sheet. You may also add other conditions into a filter.
query part will shorten the report and skip values where keys (emails) do not match. You may add other conditions into a query.
Note. Query language in Google Sheets does not have joins, and provided solution is a workaround. It shows how to make a join with a help of vlookup function in Sheets.
The provided formula gathers rows from sheet "Sales" and makes vlookup to sheet "People". You also may want to make vice-versa report: collect data from "People" and 'vlookup` data from "Sales".
"Vice-versa" report:
=QUERY(FILTER({vlookup(People!B2:B ,{Sales!E14:E, Sales!B14:B, Sales!C14:C, Sales!E14:E},{2, 3, 4},), People!B2:B, IFERROR(vlookup(People!B2:B ,{Sales!E14:E, Sales!F14:F},2,),100500)},People!A2:A<>""),"select * where Col5 <> 100500")
note! In this formula used numeric value 100500 to skip values because query works with the single data type (number or text).
Please comment here if you have any questions about how it works.

Google Sheets - Find a cell value in another column and return first cell that CONTAINS the string

I've been looking for hours but no luck. Please have a look at my below question. Thank you!
I'd like to find row values in one column (let's say "product keyword") that are texts like this: apple, banana... in all rows of a column in another sheet (let's call the column "product name"). These rows contain values like apple-ringer-1, banana-crowd-2... When the first row in "product name" column that contains product keyword is found, then it returns that product name value.
I've tried to use QUERY function but it seemingly does not search the product keyword in ALL rows in the product name column.
enter image description here
Thanks all.
You could use wildcards in VLOOKUP.
Assuming values to find are in A1:A2
=ARRAYFORMULA(VLOOKUP("*"&A1:A2& "*",Sheet2!A1:A,1,0))

Resources