auto update formula based on another cell excel - excel

I have formula: =COUNTBLANK(E1:E3)
I want the e3 to continue to auto increment when I add a column to A4.
All help and input is highly appreciated
I am using Excel 2010
Adding more details of what i need to complete this issue:
I've Merged cells A-B, C-D, E-F. A-b = item, c-d = item serial, e-f is date item sold.
Item | Serial | Date Sold
1 001 01/10/2016
2 | 867 |
3 | 999 | 02/11/2014
Items in store: 1
If item sold date is blank that means my item should still be in store.
So when I add a new item in A-B I need to auto update My formula reading date item sold. So I have formula =COUNTBLANK(E1:E3) which is dependant on A1-Axx depending on how many items I have in store.
If I add item to A4 I need my countblank formula to see I added a new item and Start counting E4 as a blank item now and show, 2 items in store..

=COUNTBLANK(OFFSET($A$1$,0,0,COUNTA(A:A),1))
Should count the number of blanks in the column E that match your data.
You could also go with:
=COUNTA(A:A)-COUNTA(E:E)
That assumes there is nothing under your table

This will grow as the data grows:
=COUNTBLANK(E1:INDEX(E:E,MATCH(1E+99,A:A)))
If your data in Column A is a string then use this instead:
=COUNTBLANK(E1:INDEX(E:E,MATCH("ZZZ",A:A)))

Related

Auto Increment the value of a cell based on an adjacent sell value plus search last number increment by 1

Ok I have 2 excel columns
1st column A "Workstream", is a data list with three numbers as a dropdown. 1,2,3
2nd column B "ID", would like to auto-populate based on the selection made from the left adjacent cell + perform a lookup to get the MAX number in the current column and ADD by 1.
For Example:
Workstream
ID
1
W1-001
1
W1-002
1
W1-003
1
W1-004
2
W1-001
1
W1-005
2
W1-002
So when a user selects from the drop-down in column A then Column B auto-populates with something like this
="W"&A:1&"-"
However, in order to complete the value, it needs to do the following:
="W"&A:1&"-" Search for the Max Record in Column B that starts with 1 or whatever value was entered into Column A, then include the next number based on the MAX value selected in Column A
So in the above example, let's say I Enter "2" in column A, then the value that auto-populates in column B would be
| 2 | W2-003
or if I selected 1 from column A given where we left off then the value that would auto-populate in column B would be:
| 1 | W1-006
If I am understanding correctly and you want the format to be "W" followed by number of the workstream (as inferred from the text of your question) try:
="W"&A2&"-"&TEXT(COUNTIF(A$2:A2, B2), "000")
If instead you want the output exactly as shown in the picture you provided, it's even easier:
="W1-"&TEXT(COUNTIF(A$2:A2, B2), "000")
EDIT: You might consider pre-dragging the formula to all the rows that you think have the possibility of being impacted so that you don't have to drag the formula each time you add a row. In that case, try:
=IF(A2="","", "W"&A2&"-"&TEXT(COUNTIF(A$2:A2, B2), "000"))

I need to retrieve the date from the row that will deplete my inventory

This is hard to explain...
I have a report that I pull from our MRP system that gives me a Due-Date, a quantity required, and an item number. There will usually be several rows with the same item number each representing a different sales order.
I have another report that gives me the on hand quantity for each item. In this report, each item is listed only once.
I need to get the Due-Date that corresponds to the row that will use up the last of my inventory. (Inv. runout)
Due-Date
QTY-REQ
ITEM
4/27/21
5
C
4/28/21
7
A
4/29/21
5
B
4/30/21
1
B
5/1/21
13
A
5/2/21
4
A
5/3/21
12
C
5/4/21
1
A
OHQ
ITEM
INV. RUNOUT
10
A
formula here, Result should be 5/1/21
5
B
result should be 4/30/21
10
C
result should be 5/3/21
I hope this makes sense, if not, please let me know what I can answer to help with this.
-Nick
You'll need a new column on the first report using IF(SUMIFS( to only show the date of lines where the stock runs out at or before that date. Then in the second report, use MINIFS(), a fairly new function, to find the earliest date in that column that matches each product.
In the below example I'm assuming that both of the above reports shown are columns A B and C, in the same excel file, on sheets called Report1 and Report2.
In cell Z2 on Report1, enter the formula IF(SUMIFS(B:B, A:A, "<=" & A2, C:C, C2) > INDEX(Report2!A:A,MATCH(Report1!C2,Report2!B:B,0)), A2, "") and copy down for all rows. This will only display the date where the stock has run out by that date.
In cell C2 on Report2, enter the formula =MINIFS(Report1!Z:Z, Report1!C:C, Report2!B2) to get the earliest relevant date displayed from the formula above.

Need assistance with Excel 2010 filtered cells query

I am trying to create a summary sheet that details the amount of a certain product number found in a separate tab. The inventory tab has around 50k records that are filtered by certain manager names.
I need to search by the first four numbers on the inventory tab to match column A on the summary sheet.
Example: The summary sheet may list the model type as 1234, but the inventory sheet lists it as 123463AW3234.
| Model | Codename | Marketing | Quantity |
|-------|----------|-----------|----------|
| 1234  | CN 1     | MN 1    | 1        |
| 1234  | CN 1     | MN 1      | 12       |
| 1234  | CN 1     | MN 1      | 13       |
I would add a formula into column D cells (quantity) that takes the text from cells within column A (model type) searches that through the inventory tab, and lists the quantity of that model type.
This is the formula I have so far, but it detects all cells with 1234 anywhere in the test. I need to edit it where it will only search for the first four numbers taken from column A.
=SUMPRODUCT(SUBTOTAL(103,OFFSET('Development-Asset list'!G2:G33080,ROW('Development-Asset list'!G2:G33080)-MIN(ROW('Development-Asset list'!G2:G33080)),,1)),ISNUMBER(SEARCH(B5,'Development-Asset list'!G2:G33080))+0)
Column G is a seperate tab and contains the full 10 digit product number. I want to pull the data from the model cell (A1) and use it to count the number of products in the sep tab G row.
These rows are filtered which is why I am using SUMPRODUCT. So column G has product numbers like 1234abcde and I want to pull data from A1 (1234) and search column G for matches, but only the first four characters.
Any help would be appreciated!
How about:
=SumIfS(ColumnToSum, ColumnToSearch, Left(A2,4))
Check out the Sumifs function that allows you to set multiple search criteria. Notice that the item I searched for in the third argument is the left 4 characters of the search cell.
how about a simple solution like this:
=SUMIF($G$2:$G$999;A2&"*";$H$2:$H$999)
it sums up the data in column H, if G starts with the four digits of A.

Automatically working out the average of filtered results

I have a spreadsheet where column P has a score between 1-6
The cell O4 has the following formula: =AVERAGEIFS(P8:P5000,P8:P5000,"<>6",P8:P5000,"<>0")
This formula searches for the average of the score in column P excluding 6, blanks and 0
Column O has staff names e.g John, Mark, Tim.......
What i want to do is for Cell O4 to automatically calculate the average of the figures shown in column P after i have used the filter function to show only results of a selected staff member.
I was hoping excel might be able to do this automatically however cell O4 appears to still be showing the average of the whole column P regardless of whether i have filtered or not.
I was given the formula below on another forum but it seems to be giving slightly wrong results albeit only by a small amount but i need to have the results exact if possible. Any help appreciated.
=SUMPRODUCT(1-ISNUMBER(MATCH(P8:P100,{0,6},0)),SUBTOTAL(9,OFFSET(P8,ROW(P8:P100)-ROW(P8),0,1)))/SUMPRODUCT(1-ISNUMBER(MATCH(P8:P100,{0,6},0)),SUBTOTAL(2,OFFSET(P8,ROW(P8:P100)-ROW(P8),0,1)))
Maybe
{=AVERAGE(IF((P8:P5000<>6)*(P8:P5000<>0)*SUBTOTAL(103,INDIRECT("O"&ROW(8:5000))),P8:P5000))}
will do what you want. Assuming the Filter is on column O.
The 103 in SUBTOTAL will also exclude if rows are manually hidden. If this ist unwanted and it should only exclude hidden rows, if filtered, then use 3 instead.
This is an array formula. Input it into the cell without the curly brackets and then press [Ctrl]+[Shift]+[Enter] to create the array formula.
I would create a separate table in a new sheet with all unique staff members and then perform the calculation. This way, you can quickly compare values for all staff just by scanning the table instead of having to constantly update the filter to see the values for potentially dozens or hundreds of staff. You would add the staff name range and criteria to your AVERAGEIFS formula.
For your example:
Sheet 2
A B
--- ---
1 | Staff Average
2 | Bob =AVERAGEIFS(Sheet1!$P$8:$P$5000,Sheet1!$O$8:$O$5000,A2,Sheet1!$P$8:$P$5000,"<>6",Sheet1!$P$8:$P$5000,"<>0")
3 | Mary =AVERAGEIFS(Sheet1!$P$8:$P$5000,Sheet1!$O$8:$O$5000,A3,Sheet1!$P$8:$P$5000,"<>6",Sheet1!$P$8:$P$5000,"<>0")
4 | Joe =AVERAGEIFS(Sheet1!$P$8:$P$5000,Sheet1!$O$8:$O$5000,A4,Sheet1!$P$8:$P$5000,"<>6",Sheet1!$P$8:$P$5000,"<>0")

Search for specific number in column and fill cells from its adjacent cells

I have a list of employee ID's for each period of the year. Each ID has Specific stats for that time period. The problem I'm running into is the list order changes every period according to the employees tasks.
Cell 1A contains the Employees ID#(ID's are Numbers only if that makes a difference). Column B has the whole list of employee ID#. I need to figure out how to write a formula or vba that checks column B for the ID# that matches 1A and populate 1C-1J with the adjacent data found in column B (columns C-J).
I hope I explained myself correctly without being to confusing. I appreciate any help.
The vlookup formula looks at the first column of $B:$J (column B) and searches for $A$1 and if it finds it returns the value in the 2.(3.,4.,...,9.) column of $B:$J
A1 | B1 | =VLOOKUP($A$1,$B:$J,2,FALSE) | =VLOOKUP($A$1,$B:$J,3,FALSE) | =VLOOKUP($A$1,$B:$J,4,FALSE) | ... | =VLOOKUP($A$1,$B:$J,9,FALSE)

Resources