I am currently working on a school project alongside a major company to help streamline their shipping process.
We were given two large Excel docs and had to isolate matching shipment numbers from each of the two sheets.
Can I perform a look up function in order to do this? Or is there perhaps a better formula to suit these purposes?
You can use INDEX/MATCH to find every ID where there is at least one match.
INDEX(PullThisData,MATCH(MatchingThisCell,FromThisColumn),0))
To find the number of matches:
If you copy the following formula along each row of data, you can then see how many matches you get on one sheet to the other per shipment ID
IF(COUNTIF(Range,Cell)>1,"",Cell)
Related
To simplify the screening of candidates for a college program, we created an Excel sheet compiling information provided by candidates.
They had to select one or more academic achievements from a droplist (some have none, some have 25).
The result in the Excel file is a cell for each student/row where the achievements are separated by line breaks.
We have a table where each of the possible achievement is worth a certain number of points.
For instance, a master's degree is worth 4, a published article is worth 2, etc.
We want to add a column that states the number of points a candidate has based on the cell that contains one or more achievements.
How can we do that with Excel?
Thank you!
Table with weighted value of achievement
Desired result
Ideally, some students have multiple occurrences of an achievement and we would want to take it into account (for instance, published two articles = 6 points) but that's a nice-to-have.
As of now, I have tried:
Combining SUM and VLOOKUP function, but I can only seem to recognize one value per cell
Experimenting with the SUMIF function, but that did not seem to work for me
Experimenting with nested conditions
Adapting solutions that require multiple criteria in multiple cell (for instance, return price if the row contains dress and blue, but none seem to apply for the situation when there are multiple strings in a single cell.
VLOOKUP works but you have use an array for lookup_value consisting of each achievement. Since the achievements are from a drop-down, we can assume they are spelled correctly.
We can use FILTERXML to split the entry by the line-feeds into an array of separate nodes, and then use that to find the appropriate values.
FILTERXML is in Windows Excel 2013+ but not available in Excel for MAC or online. If necessary, I can supply a different function to do the splitting.
For example:
=SUM(VLOOKUP( FILTERXML("<t><s>"& SUBSTITUTE(E2,CHAR(10),"</s><s>") & "</s></t>","//s"),AchieveTbl,2,FALSE))
AchieveTbl
Results
Alternatively you could use =SUM((LEN(SUBSTITUTE(E2,$A$2:$A$8,$A$2:$A$8&"_"))-LEN(E2))*$B$2:$B$8)
This is based on an answer here
I am trying to get a dedicated material table in excel. So we have a few products and these products require particular materials. I know how much and which materials go in particular products. I also know how much is sold in which year, now I want to calculate the required materials for these years. Because the productbase is large (>100), and thus >100 columns, I would like to use some lookup or index function to automate the multiplication.
As shown in the picture, I tried using a sumproduct, which was also explained in some other question on stackoverflow. This sumproduct should multiply all values obtained in one table with the corresponding values in the other. I feel that something is not right about my first two match functions (see picture again)
The code used:
=SUMPRODUCT(INDEX($B$19:$E$22;MATCH(B$2;$A$19:$A$22;0);MATCH(B$10;$B$18:$E$18;0));INDEX($B$3:$E$5;MATCH($A11;$A$3:$A$5;0);MATCH(TRUE;$B$3:$E$5>0;0)))
The image contains some extra info and explanation of the actual need
The reason that it needs a lookup or index is because the products in table 3 are always in another order than what is shown in table 1.
I would like to have this sumproduct as automated as possible, thank you in advance:)
You could try and adapt the below:
Formula in B11:
=SUM(INDEX($B:$B,MATCH($A11,$A$1:$A$5,0)):INDEX($E:$E,MATCH($A11,$A$1:$A$5,0))*TRANSPOSE(B$19:B$22))
Entered as array, CtrlShiftEnter
Drag right and down into matrix.
Side-note: Be sure to edit your question to include all relevant information, including your own atempted formula, as text. Way easier to copy paste sample data that has been formatted as markdown :)
It's not too easy to explain this but basically I have a data set that pulls through information to the dashboard.
I am looking to find the unique distinct amount of managers matched to 5 simultaneous criteria.
The data set looks like this:
The dashboard has an option to chose criteria to search this database with which looks like this
My Question is - Say I search the entire database for jobs by a certain Principal (using the * wildcard for all other criteria). How do I then find out the distinct number of managers and consultants working on these jobs?
Sorry I couldn't attach the figures as figures rather than a photo - not sure how to do it.
Just wanted to demonstrate how you could approuch this:
My sample data...
Formula in J1:
=SUM(--(FREQUENCY(IF((A2:A10=I1),MATCH(F2:F10,F2:F10,0)),ROW(F2:F10)-ROW(F2)+1)>0))
Formula in J2:
=SUM(--(FREQUENCY(IF((A2:A10=I1)*(B2:B10=I2),MATCH(F2:F10,F2:F10,0)),ROW(F2:F10)-ROW(F2)+1)>0))
Formula in J3:
=SUM(--(FREQUENCY(IF((A2:A10=I1)*(B2:B10=I2)*(C2:C10=I3),MATCH(F2:F10,F2:F10,0)),ROW(F2:F10)-ROW(F2)+1)>0))
All these formula need to be entered through CtrlShiftEnter
Unfortunately IF(.. doesn't support wildcards, so that's why I do it like this.
Append on this for the 4th and 5th criteria....
Using COUNTIF and VLOOKUP, the goal is to count my inventory of Laptops and return the number I have in stock.
My current formula is this:
=COUNTIF($A$3:$A$10000,H4)
As my table only has one entry for "Laptop", the formula evaluates to 1.
The next step was to incorporate some sort of VLOOKUP for quantity. As an example, Row 17 has an entry for "Monitor" with a specific model, with a column E (quantity) value of 5:
Monitor HP Compaq LA1951G 1FL SVR 5
I could use a VLOOKUP here:
=VLOOKUP(H6,$A$3:$E$10000,5,FALSE)
However, I have a second set of monitors with a different model. From what I understand of VLOOKUP, the formula stops evaluating at the first match.
I'm considering simply listing every possible model in our environment and strictly using VLOOKUP only, but this makes my life more complicated.
Any suggestions on a better way of doing this before I do a lot of manual work would be appreciated. I've linked a sanitized copy of my workbook via Google Sheets here.
I believe the SUMIF() function would be more useful here.
Replace the
=COUNTIF($A$3:$A$10000,H4)
with
=SUMIF(A:E,H4,E:E)
Having done this same process for many companies, I suggest you also consider a Pivot Table. It can automatically update, auto-sum everything, and auto-count everything if you've set it up properly.
Pivot Tables also work in Excel and Sheets equally well. Just make sure that you're defining entire Columns of data for the basis of the data sets and it will be dynamic! E.G. Don't do A1:F50, do A:F for your data set definitions.
I'm looking for a little bit of help learning about how to use vlookup and iferror formulas together.
I am working as a licensing specialist within the insurance industry. My job requires that I frequently access more than a dozen spreadsheets that are emailed to us on a weekly basis from our clients. I am working to develop tools that allow us to consolidate that information on-demand to be able to run reports. I'm having no trouble using the VLookup function to pull data from various spreadsheets using an unique identifier. I do need some help, however, with a trickier formula.
I have put together a spreadsheet that allows me to put in the ID of the representative and it returns various bits of information, such as their name, license numbers, job codes, etc. Now I need to come up with a formula that takes the value returned in the job code field and searches another spreadsheet to return what training they are required to complete based on their job code. This spreadsheet is about 2000 rows, and is formatted with the training names spanning across the top row, job codes listed in column "A" and the word "yes" in each column that matches a training that the job code is required to take.
It looks like this: https://i.imgur.com/71COmfF.png
I need the formula in my reports spreadsheet to lookup the job code using VLookup and then return the column header if the cell has text.
The data will be loaded into this spreadsheet: https://i.imgur.com/2CyFURt.png
Here is the Vlookup formula I am using to get the job code:
=VLOOKUP(B3,'.\[Weekly_HR_Report_040615.xlsx]HR'!$A:$Q,10,FALSE)
How can I pair that same kind of formula with something like an IfError formula to return the column header if there is a "Yes" in the cell of the row that matches their job code?
I know that I can work through it as an array using VBA, but I would prefer to just place a formula in each cell so that I can pass this spreadsheet to another college when I move to a different role in the future and they won't struggle too much with adding to it.
Thanks for any help that you might be able to provide! I really appreciate it!
I would use INDEX and MATCH to cross reference and retrieve the titles where applicable:
=IF(INDEX('JobCode_Training.xlsx'!$A$1:$H$6,MATCH($H$5,'JobCode_Training.xlsx'!$A:$A,0),2)="Yes",INDEX('JobCode_Training.xlsx'!$A$1:$H$6,1,2),"")
=IF(INDEX('JobCode_Training.xlsx'!$A$1:$H$6,MATCH($H$5,'JobCode_Training.xlsx'!$A:$A,0),3)="Yes",INDEX('JobCode_Training.xlsx'!$A$1:$H$6,1,3),"")
=IF(INDEX('JobCode_Training.xlsx'!$A$1:$H$6,MATCH($H$5,'JobCode_Training.xlsx'!$A:$A,0),4)="Yes",INDEX('JobCode_Training.xlsx'!$A$1:$H$6,1,4),"")
etc.
I wasn't sure what your reference table is saved as, so you'll need to replace 'JobCode_Training.xlsx'! with whatever the correct path is.
Since you have multiple trainings that can apply to each jobcode, you'll either need to have multiple cells for the results, or you can concatenate them into one.
The following article from excelvlookuphelp.com answers your question I believe...
The Problem
You might be expecting that not all of your search values are going to return something from the search table. Instead of the formula returning #N/A you’d like the result to look different when your vlookup value isn’t found (either blank or an indicator to show that the value hasn’t been found or a zero if you’re wanting to do maths with the results).
The Solution
You can use the iferror function.
It works like this
= iferror (YourVlookupFormula, WhatToSayInsteadOf#N/A)
Here’s an example
=iferror(vlookup(D3,A:C,3,false), “No Value Found”)
Or if you would rather it was just blank then instead of having No Value Found, just have the two sets of inverted commas, like this
=iferror(vlookup(D3,A:C,3,false), “”)
source: excelvlookuphelp