I am trying to create a simple program in which I have 2 tables. Table A lists all the relevant items. Table B is for placing Client requests. As you can see, the Requested Items column on Table B contains a drop-down list with all the predefined items in Table A. There is also a column stating the quantity request for each item.
I am thus trying to create some sort of dynamic formula, which will be able to find all occurrences of a particular item in Table B, whilst calculating the sum of the Quantity for each of these occurrences, and put that value in the "Quantity Requested column in Table A. A simulation with manually-input data can be seen below:
Thanks in advance for your responses.
Use this structured formula at the column Qty Requested of TabelA (in any cell).
=SUMIFS(TableB[Qty],TableB[Requested Item], [#Item])
This structured format exploits very well the tables; it automatically fills the column and it will adjust whenever any of the two tables grows, shrinks, changes location, etc...
Use Sumif in C8 write:
=SUMIF(G:G,B8,H:H)
G:G is the column of Requested Item in Table B
H:H is the column of Qty in Table B
B8 is the Item in Table A
You can drag the formula down
Related
I have a database tab which holds all my information for each item in my inventory. This is always changing as I add new inventory. I want to take certain information in that tab (columns A & B) and use it in a separate tab called stock inventory in columns A & B. When it transfers I would like a blank cells in columns C,D,E, and F. I did try VLOOKUP however, because column A on the database tab is repeated, when the information was transferred to the stock inventory tab it duplicated information instead of actual information. For example Column A may say "Scale" column B may say "abalone, there may be a second entry with the same information in column A but different information in column B. When it transfers to the stock inventory tab anytime it recognizes "scale" in the column A it would say Abalone. This is not what I want. I want to bring over actual information for column B even if column A is the same. Any help is appreciated.
To solve the problem of the repeated value in the VLOOKUP you could create helper column on the left of the first vlookup matrix column, with the formula =ROW()&A2, and use this value as key to be searched with vllokup instead of the value in A1: there will be no duplicates, as the value will be the concatenation of the row number and the name of the article.
I am looking for a formula to Sum all the rows in A column, the rows count is not known as user can enter runtime. Every formula on google is taking nth row range.
Since you have used table you can use the table name references in your formula. Every time the table size increase or decrease in row numbers, the formula will adjust to the new range, given the same header name is used.
So the formula for column A (entered in cell H10) would look like this:
=SUM(Table1[[#All];[Value]])
Table1: Is the name of your table. Click on your table and go to "Design" (see picture). At the very left you have the table name, in my case "Table1".
[#All]: Defines what you want to look at, in this case all values.
[Value]: Which column (header name of the specific column) you want to evaluate.
The formula for the other looks like (cell H11):
=SUM(Table1[[#All];[Mortgage]])
and (for cell H12):
=SUM(Table1[[#All];[Amount]])
There are function options with Table use that Option to add sum of that column then you'll get sum of column A when use that option!
Check this link: https://www.ablebits.com/office-addins-blog/2014/10/31/excel-sum-column/ -- check "Convert your data into Excel table to get total for your column" in this article.
it has detailed information how to do various operation with sum!
For my question I am trying to reduce a very large amount of data using the =countif function in regards to a specific Employee ID (using =vlookup).
In Column 'A' I have every employee ID listed only once. In columns B, C, D, E, and F I would like to count every time that employee has been Hired, Promoted, received a Pay Increase, been Demoted and Fired, respectively.
In Column 'I,' I have again a list of employee ID's and in 'J' each time one of those actions were implemented.
Since there are more than 10,000 employee iterations that exist in column 'I' this is why I am trying to condense these down to numeric values in columns B:F.
ACTUAL QUESTION: Is there anyway to 'nest' these two functions in order to get the required results that I want?
Thanks in advance.
You can use Countifs with multiple conditions (not Countif, which takes only one condition)
Consider the following screenshot. The formula in cell B2 is
=COUNTIFS($I:$I,$A2,$J:$J,B$1)
Copy across and down. Note the position of the $ signs. They are important. The column references for columns I and J are absolute, and will not change when the formula is copied across. The reference to $A2 will always refer to column A, but the row will adjust when copied down. The reference to B$1 will always refer to row 1, but the column will adjust when the formula is copied across.
You can do a similar thing without any formulas at all, using a pivot table. Click a cell anywhere in the data in columns I or J, then click Insert > Pivot Table. In the pivot table pane that appears on the right, drag the Employee ID to the Rows area, drag the action to the Columns area and drag either of the fields to the Values area. The result looks like this:
Look Ma, no formulas!!
I have a table series of tables with 3 columns which record the location of items. Eg table A, A1, A2.... B, B1 etc. etc.:
Each table contains the following columns:
Customer eg. 2. Description and 3. Spec. Number
I recently audited the physical shelves and created the same table alongside the old table in an excel spreadsheet. This new table only has data in the spec. Number column and contains less entries as some of the items on the shelf have been removed. The tables are not aligned on the same rows. i.e. not directly across from each other.
What I would like to do is create a formula to find for example spec number 12345 in the old table and copy the customer and description in the old table which is in the 2 cells to the left of the spec number into the two cells to the left of the new table I have for 12345?
This is fairly complicated but I would think is doable? This is a screen grab of what I am trying to do:
As you can see 4780 was in the shelf when I did the stock take and I only took down the spec. number to be quick. Now I want to copy the customer and print design details over from the 4780 in the table on the left automatically and do this then for the rest of the spreadsheet if possible.
Seems:
=INDEX(B:B,MATCH($J4,$D:$D,0))
met the requirements, copied one cell to the right and both formulae then copied down to suit. OP's image does not show sheet headings, but the positions assumed by the above formula are:
So the formula looks for the J4 value (4780) in ColumnD and if found the MATCH function returns the row number concerned, that then is taken by the INDEX function to determine the relevant cell in ColumnB from which to output the content.
The third parameter in MATCH is 0 to require exact matching only.
The #N/A results could be suppressed by wrapping the formula in IFERROR.
I have a table A and table B. Table A is the input table and table B is the output table. Table A has 2 Columns; Name and Quantity, and table B also has 2 Columns Name and Quantity, but the difference is that table B already has 48 names written inside it and the Quantity section is empty, And the whole of table A is empty. I'm not doing a very good job of explaining stuff. I know but if you are with me so far then.
Now I go to table 1 and put in the following data in the syntax [Name,Quantity] : {Sam,10},{Lilly,15},{Sam,25}. After putting in that data, I want the appropriate quantity cell in table B corresponding to the names to be equal to the total quantity each name has in table B.
In this case I want the output of table B show me {Sam,35},{Lilly,15} and the rest of the Names = 0.
I would prefer if this method stays in the terms of excel formula calculations and no macros or VBA as it will be easier for me to integrate this with the other functions of the spreadsheet I'm making. But I would not mind having alternatives.
If your data format is like this:
You could use either SUMIF or a Pivot Table
If you use SUMIF, then you could list all the names with zero's.
If you use a Pivot Table, a list of names will be generated automatically.
For SUMIF, if the Quantity column of Table B starts in B2, you could use a formula like:
=SUMIF(Table_A[Name],A2,Table_A[Quantity])
and fill down to last row.
If Table A is not a "real" table, just substitute the range references for the appropriate columns.
Results of the SUMIF method:
If you want to use a Pivot Table, then with the cursor in Table A, select Insert / Pivot table. Then drag Name to the Row Labels area, and Quantity to the Values area. Format to taste.