Need assistance with Excel 2010 filtered cells query - excel

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.

Related

auto update formula based on another cell 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)))

Excel multi column lookup

I am unsure how to Google this one. I have a table that looks like the below
Last Name | First Name | Team A | Team B | Team C
Smith | John | X | |
Doe | Jane | | X |
This would be the main sheet. The names in this sheet are divided into other sheet depending on what department they are in. Those sheets are setup in the same formats with the same columns. If the people in the main sheet are marked with an X in one of the columns I would like that same column marked in marked in the department sheets.
Your best bet might be to create a hidden column A where the value is a combination of column B and column C on all of your tabs. You could then use the standard VLOOKUP wrapped in an IFERROR clause.
For example,
=IFERROR(VLOOKUP(A1,Sheet1!A:F,3,False),"")
The IFERROR handles the instance that you may have a name on a sub tab not on the main tab. It returns blank instead of #N/A. The VLOOKUP is checking the value in A1 to what is in A1 on your main tab. A1 would be the combination of First and Last. The VLOOKUP would need to be in each of your team columns shifting the column returned number in each VLOOKUP.

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)

Excel: Create Custom Sheet 2 Based on Data in Sheet 1

I have two sheets in a spreadsheet. Each sheet has a first column with common values (however they are not sorted the same and they are not all there in each sheet).
What I'm trying to do, if possible, is put a formula in sheet 2, where, if column 1 is a match for sheet 1, copies selective data from certain columns in that same row in sheet 1, to certain columns in sheet 2.
Example:
Sheet 1 has a heading setup and sample data row like this:
Title | Day of Week | First | Last
Supervisor | Wednesday | Mike | Jones
Sheet 2 has a heading setup and sample data row like this:
Title | Surname | Weekday
Supervisor | (empty cell) | (empty cell)
After running the mystery formula I'm looking for, placed in the 2 empty cells above, sheet 2 should match on the Supervisor key in sheet 1 and copy in data I have specified into each column, such as:
Title | Surname | Weekday
Supervisor | Jones | Wednesday
(In this case I have told it to map the "day of week" column to weekday, and map the "last" column to "surname").
I hope this is easy/possible??? Help???
VBA is not necessary. You can use a simple VLOOKUP:
=VLOOKUP(cell to look-up,
range where you want to look up the values (first column *must* contain the keys to look-up) including all columns that you want to retrieve,
the position of the column to be retrieved relative to the first column specified in argument 2,
0 (specifies you want an exact match))
For example:
=VLOOKUP(A1, Sheet1!$A$1:$D$150, 2, 0) ' Retrieves the 2nd column matching criteria in A1
Please notice, however, that you need your keys to be unique. Matching information based on the title seems a bit odd since it is likely there will be more than one person assigned to a certain role. For example, there may be more than 1 supervisor.
Use INDEX and MATCH (better than VLOOKUP).
I suggest renaming your headers so they match on both sheet.
Sheet 1 should be :
Title | Weekday | First Name | Surname
In sheet 2, cell B2 type in
=INDEX(Sheet1!$A:$D,match($A2,Sheet1!$A:$A,0),match(B$2,Sheet1!$1:$1,0))
You can drag and drop it in column C as well, it will work since you are using two MATCH functions with the cells properly anchored.

Find two matching rows and display data from the thirt one (Excel)

So i have Two Sheets.
First sheet contains two columns
BRAND | LEFTOVER
The second sheet consists of two columns also.
BRAND | LEFTOVER (%)
So in case if the BRAND row value in the first Sheet will match the BRAND row value in the second i want to display the matching LEFTOVER (%) row value in the first sheet rows in the column LEFTOVER.
Kind of lost here.
Appreciate any ideas. Thanks.
In Sheet2:
. A | B
--------------------
1 BRAND | LEFTOVER %
2 X | Y
3 |
In Sheet1:
. A | B
--------------------
1 BRAND | LEFTOVER
2 X | =VLOOKUP(A2,Sheet2!A:B,2)
3 |
The VLookup function searches for its first parameter (in this case the value of Sheet1!A2) in the first column of the range denoted by the second parameter (in this case the leftmost column of the range containing columns A and B on Sheet2)
It then returns the value from that same row of the range that is to the right in the columns denoted by the third parameter (1 is the leftmost column where the matched value was). So in this case we use the number 2 because 1 means column A and 2 is column B (which explains why we used a two column wide range for the second parameter - it needed to encompass the column the result was in)
This isn't the only way to do this, but it is the easiest.
As Jerry stated VLOOKUP is the simplest way to do this.
HOWEVER if you have multiple/repeat instances (rows) in BRAND, VLOOKUP will only return the first record (row) that appears in your data.
If this is the case, you will need to add either a unique identifier column; and/or additional criteria to differentiate between the repeat instances.
As an example column A is used as a unique identifier to differentiate between the 2 'Nike' rows.
A B C
1 BRAND LEFTOVER
2 Nike 50
3 Adidas 25
4 Reebok 30
5 Nike 29
I feel that you can use vlookup to accomplish your goals.
Let me explain it in a bit detail.Suppose you have two sheets as:
A | B | A | B
--------------------- | -------------------
1 BRAND | LEFTOVER % | 1 BRAND | LEFTOVER
2 X | Y | 2 X | =Vlookup(A2,Sheet2!A:B,False)
3 | | 3 |
Sheet2 | Sheet1
After this you can drag this formula for the entire range. This will automatically make the formula correct for the below cells as well.
Also, if you need to populate any other fields from the Sheet2 then you can also use the vlookup as an array formula like: VLOOKUP(A2,Sheet2!A:B,{1,2,3,4},FALSE)
Enter this as an array formula using Crtl+Shift+Enter
Here {1,2,3,4} stands for the columns to be fetched.
If you want to know more about vlookup then read this article: http://www.exceltrick.com/formulas_macros/vlookup-in-excel

Resources