My Vlookup formula is the following currently:
(Weekly Consolidated Sheet)
Column C:1
=iferror(arrayformula(if(D:D="Item No.","Document No.",('For NAV'!C3:C))),"")
Column D:1
=iferror(arrayformula(if(A:A="Posting Date","Item No.",Unique('For NAV'!D2:D))),"")
Column I:1
=iferror(arrayformula(if(A:A="Posting Date","Quantity",sumif('For NAV'!D:D,D:D,'For NAV'!I:I))),"")
I would want to consolidate data from "For NAV" sheet into "Weekly Consolidated" Sheet.
"For NAV" Sheet has duplicate Item No. which I want to make it Unique and Sum the total Quantity (Column I)
Now that the document number seems to be the main Criteria I am stuck.
The following is what I need:
Main Criteria = Document No
Example:
ADW 01-07/03
-Item number which has same document number should consolidate its own Unique item number and sum the Quantity
ADW 08-14/03
-Item number which has same document number should consolidate its own Unique item number and sum the Quantity
Other columns is OK i can vlookup from "Item Listing" Sheet based on the Item code
Link for the spreadsheet as below:
https://docs.google.com/spreadsheets/d/1SL63pIF35skZjjbFjTRgfsbSYHvDr-gRRKciZbYFRUU/edit#gid=1168278681
Try changing your formula in I2 to
=ArrayFormula(iferror({"Quantity";sumif('For NAV'!C3:C&'For NAV'!D3:D,C2:C&D2:D,'For NAV'!I3:I)}))
The way this works is by making a unique string generated from the values on the C and D columns to compare between sheets. In this case you can simply joining them together because the the C column is always the same size.
Related
This formula had worked in the past, but I've noticed it's no longer calculating correctly. I have Multiple Sheets and am attemping to add up the total number of inventory items received across multiple sheets that match a certain SKU.
The below formula should sum Column C (numeric value, quantity of items received) across both the 'Inventory Entry' and 'Inventory Entry - DONE' sheets where the SKU (string, Column B of current sheet) matches Column H of the 'Inventory Entry' and 'Inventory Entry - DONE' sheets.
=ARRAYFORMULA(SUMIFS('Inventory Entry'!$C:$C,'Inventory Entry'!$H:$H,$B:$B))+ARRAYFORMULA(SUMIFS('Inventory Entry - DONE'!$C:$C,'Inventory Entry - DONE'!$H:$H,$B:$B))
I've seen other threads with different work-arounds using QUERY, but I'm unable to use those because Column C of my both my Inventory sheets can contain either a string or numberic value depending on the type of item being inventoried.
I've tried whittling the formula down to just 1 Inventory sheet but receive the same results.
As an example, a cell is returning '10' when there are 25 separate instances of the SKU in the Inventory sheet and it should be returning '305' total items. All the cells being summed contain numerical values and none of them have a value of '10'.
ARRAYFORMULA and SUMIF don't interact as expected. Try with BYROW:
=BYROW(B:B,LAMBDA(each,SUMIFS('Inventory Entry'!$C:$C,'Inventory Entry'!$H:$H,each))+SUMIFS('Inventory Entry - DONE'!$C:$C,'Inventory Entry - DONE'!$H:$H,each))
It appears this is an issue with using any function that uses any form of SUM. Opening a new thread.
I am creating a sheet in Google Sheets for items in a video game called EVE Online, for what that matters. Each item in Sheet1 can be "reprocessed" into basic minerals. Each item in Sheet2 lists the basic minerals.
In Sheet1!A1, I have "Item Name."
Sheet1!A2:A251 is items.
Sheet1!B1 is "Reprocessed."
Sheet2!A1 is "Item Name."
Sheet2!A2:A251 is the same items from Sheet1, copied and pasted over.
Sheet2!B1:AG1 is mineral names.
Sheet2!B2:AG251 is numbers of specific minerals the items can be reprocessed into.
In Sheet1!B2, I want to put a formula that will look at the item name in Sheet1!A2, find the corresponding item in Sheet2, and sum that row.
I have tried:
=SUMIF(Sheet2!$A:$A,$A2,Sheet2!$B:$AG)
This yields a sum of zero, where the sum of the numbers I have for Sheet2!A2 (the numbers in Sheet2!B2:AG2) should be 23,587.
Since I don't know what your data looks like I have prepared a sample data based on what you shared in the question.
If your Sheet2 looks like this:
then use the formula =SUM(INDIRECT("Sheet2!"&MATCH(A2, Sheet2!A:A, 1)&":"&MATCH(A2, Sheet2!A:A, 1))) in Sheet1!B2 and it should work as shown below
In Google Sheets for inventory management, sheet1 is stock in which Product and Quantity are mentioned, sheet2 is the sale of the day. I want to automatically deduct stock when a product is written over there, if apple is sold, then it should automatically deduct one quantity from sheet1.
The sheet is here.
Some code like this:
function onedit(sheet2,A2) {
if the product in Sheet2!A2 is in Sheet1!A2:A,Subtract 1 from Sheet1!B2:B
}
In your cell B2, you can insert this formula:
= 4 - SUM(QUERY(sold!$A$1:B,
"select count(A)
where A = '" & A2 & "'
group by A", false))
Then, you can drag it down to let the formula apply to all your rows.
The formula counts the number of occurrences in the "sold" sheet of the term in the column A of the first sheet. The QUERY function returns a table with one column and two rows (header and data). the SUM is applied to it, and reduces the QUERY result to a single number.
As with all formulas, results are kept up to date by the Google sheet automatically.
Instead of having the initial inventory in the formula itself, I suggest to use a separate column, for example column C. The formula above would then start with C2 instead of 4.
How do I create multiple sheets that use a Google sheet named TOTAL as the data source? Each sheet must contain the same three columns from TOTAL and other specific data, for instance, FLUX will have six columns, three from TOTAL and three custom columns added manually.
I used a query function to import the data from TOTAL to FLUX so that updating data in TOTAL will update it also in FLUX
The data in TOTAL are not fixed. It will change adding rows, which might change the order of the list. For instance, adding the row 13 in TOTAL will shift down the data in column A:C in FLUX, but not columns D:F
Is that a way to keep the reference out of the QUERY part?
Here an example: Click me
you would need to create ID system and then you would be able to match your query with rest of the static columns. in sheet SALES remove that query and put IDs in A column. then your query will be:
=QUERY(TOTAL!A1:D, "SELECT A, B, C, D WHERE C is not null", 1)
where column A contains IDs and then you create new sheet SHEET3 and paste this query in A1
and this formula in E1:
=ARRAYFORMULA(IFERROR(VLOOKUP(A1:A, SALES!A1:G, {4,5,6}, 0), ))
I have the same problem and I can't understand few steps from the answer.
Firstly, the A columns of both sheets (TOTAL and SALES) must have IDs?
Secondly, I can't really understand how the Sheets SALES should look like. Should it be like, Col A = IDs, ColB to C query from TOTAL and Col E to G static data?
In this case is it still correct creating a query in Sheet3 reading data from TOTAL?
Thank
I'm struggling with the following and help/guidance would be appreciated. The attached Google Sheet has 3 sheets;
Sheet1 has 2 data fields (month, store name).
Sheet2 has 4 data fields (month, store name, fruit, quantity)
A query on Sheet3 in cell A3 outputs a set of months and store names from Sheet1 which is then used to find quantities of a given fruit from Sheet2 (in this example, it's apples). The results are listed on Sheet3 in columns D and E. I used both Index(Match) and Filter to output the Apple quantities as i tried to figure out my ultimate goal - how to use a single formula, including the query itself, to get to the aggregate apple total in Row 9 (i.e. without needing to do all the index(match) or filter formulas). Said another way, what formula on Sheet3 in cell D9 would run the query against Sheet1, use the results to find the month, store name, fruit, and quantity matches on Sheet2, and total them for a single output cell on Sheet3 D9?
Thoughts?
You can use a combination of counta(query()) to do this.
For A1:A that contains a mixture of fruit (apples, bananas, grapes, star fruit), use:
=counta((query(A1:A, "select A where A like 'apple'")))
Check out this very simple example sheet