Match variables between two excel files - excel

I have two datasets containing occupations names and their description in excel:
I want to create a new dataset with all occupations that match between both datasets.

This can be achieved using a VLookup.
For ease, have all three datasets within the same spreadsheet, if you can, if not doesn't matter, but have them open.
Copy all the Occupations (not descriptions) from DataSet1 into Dataset 3.
Enter the formula below in dataset3 under the occupation description header.
Occupation = cell of the occupation in dataset 3.
Dataset2 Range = Enter the range of the searchable content ensuring the occupations are the left most(First selected).
Drag the formula down
Select All and insert as Table and filter out on "No Match").
Formula example:
=IFERROR(VLOOKUP(Occupation,Dataset2 Range,2,FALSE),"No Match")

Related

How to make a Query to write cell value based on content of another spreadsheet on GoogleSheets?

I've two spreadsheets and I want write the values of a column based on the values of another columns.
On the master spreadsheet I've two columns of interest: 'Ativo' and 'CNPJ'.
On the second spreadsheet called 'CNPJs' I've the two columns called 'TICKER' and 'CNPJ'.
My goal é automatically fill the column 'CNPJ' of master spreadsheet based on the condition 'Ativo' = 'TICKER' on the 'CNPJs' spreadsheet.
This is the master spreadsheet with the void column ready to be filled.
This is the CNPJs spreadsheet with the desired values of CNPJ field.
This is the query used and returning a error:
=QUERY(CNPJs!A2:B16; "select B2 where (CNPJs!A2 = A2)")
The query won't work as written.
It would usually be in this format:
=QUERY(CNPJs!A:B;"select B where A matches 'xxx' ";0)
but it won't evaluate down each row for xxx.
You're probably better with a VLOOKUP in an ARRAYFORMULA like this in cell B2 of the master sheet:
=arrayformula(iferror(vlookup(A2:A;CNPJs!A:B;2;false);))

Determine sequence of most used words in Excel data set

I need to determine sequence of most occurring word in a excel data set. Eg.
A B C D
Joyce Bremner Lewis Chapman Claire Harper
Lesley Brown Brian Clough Natalie Hassan
Emma Cartwright Janet Coldwell Gillian Hedley
Lewis Chapman Sheena Doig Lesley Brown
Brian Clough Karen German Emma Cartwright
Janet Coldwell James Gledhill Lewis Chapman
Sheena Doig Maggie Gowan Brian Clough
Which name is the most occurring and then 2nd most occurring word and so on.
I have found solution for determining the most concurring word in sequence when you take only one column into consideration but struggling to combine for multiple column. Below is the formula used:
Enter this array formula in C2:
=IFERROR(INDEX(A2:A10,MODE(MATCH(A2:A10,A2:A10,0)+{0,0})),"")
Enter this array formula in C3 and copy down until you get blanks:
=IFERROR(INDEX(A$2:A$10,MODE(IF(COUNTIF(C$2:C2,A$2:A$10)=0,MATCH(A$2:A$10,A$2:A$10,0)+{0,0}))),"")
Just in case the single column and pivot are a feasible idea...
Put all the names in one column
Format as table (my pref.)
Select "Summarize as pivot table"
Add "Name" field to Rows and Values

Return Value if 4 columns match in Excel

I have 2 sheets that I am working with in Excel:
1) Master Price Sheet
2) Entry
My "Master Price Sheet" sheet includes specific lumber dimensions and specifications as well as an assigned pricing (There are probably 200 different options available for pricing purposes so it takes a long time to manually look up each price)
When I am entering lumber lists into my "Entry" sheet. . .I'd like to return the value from the column "Price" from the "Master Price Sheet" only if the values in columns "Size (W)", "Size (H)", "Length", and "Species" entered into the "Entry" sheet matches columns in the "Master Price Sheet" so that it can find the pricing for me
What formula would be able to help me out with this?
Any help you can provide would be greatly appreciated
I've added images to this post below so that you can see what I'm working with
The easiest way is probably to create a helper column in both tables, where you combine the four cells with an ampersand & sign. This will create a unique key that you can use in a lookup function like VLoookup or an Index/Match combination.
For example: in the Master table, insert a new column before the price and in that new column use the formula (starting in cell G3
=A3&C3&D3&E3
Do the same in the Entry sheet table. Then you can look up the price like this in cell H3 of the entry table:
=vlookup(G3,'Master Price Sheet'!F:G,2,False)
Copy down.
This is the basic principle. You can add more refinement by error catching, so you don't get errors if rows are empty. One of many approaches would be to wrap the formula in an IfError, or check that all four cells have content before performing the Vlookup.

Using Excel, how to compare two plans (line has same code but different number of characters)

I have two plans in Excel: both have the columns 'code' and 'name'. I want to display in plan3 the rows from plan1 whose name column has a different number of characters from name column from plan2 (code column is the primary key). I'd like to use Excel formulas to do that.
Using the answer suggested, I finally solved the problem: in brazilian Excel, the formula is:
=NÚM.CARACT(PROCV(A2;Plan1!A:B;2;0))<>NÚM.CARACT(PROCV(A2;Plan2!A:B;2;0))
Maybe, where G2 etc is your plan3 'code':
=LEN(VLOOKUP(G2,plan1,2,0))<>LEN(VLOOKUP(G2,plan2,2,0))
copied down to suit, where 'TRUE' indicates the string lengths are not equal and plan1 and plan2 are named ranges.
Where plan1 and plan2 are not named ranges but sheet names and layout is as in image, please try:
=LEN(VLOOKUP(A2,plan1!A:B,2,0))<>LEN(VLOOKUP(A2,plan2!A:B,2,0))
for example:
Filter ColumnB of plan3 to select TRUE for those that do not match. ColumnA of pla3 should be a comprehensive list. The ordering does not matter.

Excel: If Cell in Column = text value of X, then display text (in the same row, but different column) on another sheet

This is a confusing request.
I have an excel tab with a lot of data, for now I'll focus on 3 points of that data.
Team
Quarter
Task Name
In one tab I have a long list of this data displaying all the tasks for all the teams and what Quarter they will be on.
I WANT to load another tab, and take that data (from the original tab) and insert it into a non-list format. So I would have Quarters 1,2,3,4 as columns going across the screen, and Team Groups going down. I want each "task" that is labeled as Q1 to know to list in the Q1 section of that Teams "Block"
So something like this: "If Column A=TeamA,AND Quarter=Q1, then insert Task Name ... here."
Basically, if the formula = true, I want to print a list of those items within that team section of the excel document.
I'd like to be able to add/move things around at the data level, and have things automatically shift in the Display tab. I honestly have no idea where to start.
If there is never a possibility that there could be more that 1 task for a given team and quarter, then you can use a formula solution.
Given a data setup like this (in a sheet named 'Sheet1'):
And expected results like this (in a different sheet):
The formula in cell B2 and copied over and down is:
=IFERROR(INDEX(Sheet1!$C$2:$C$7,MATCH(1,INDEX((Sheet1!$A$2:$A$7=$A2)*(Sheet1!$B$2:$B$7=B$1),),0)),"")
I came across this situation. When I have to insert the values into a table from an Excel sheet I need all information in 1 Column instead of 2 multiple rows. In Excel my Data looks like:
ProductID----OrderID
9353510---- 1212259
9650934---- 1381676
9572474---- 1381677
9632365---- 1374217
9353182---- 1212260
9353182---- 1219361
9353182---- 1212815
9353513---- 1130308
9353320---- 1130288
9360957---- 1187479
9353077---- 1104558
9353077---- 1130926
9353124---- 1300853
I wanted single row for each product in shape of
(ProductID,'OrdersIDn1,OrderIDn2,.....')
For quick solution I fix it with a third column ColumnC to number the Sale of Product
=IF(A2<>A1,1,IF(A2=A1,C1+1,1))
and fourth Column D as a placeholder to concatenate with previous row value of same product:
=IF(A2=A1,D1+","&TEXT(B2,"########"),TEXT(B2,"########"))
Then Column E is the final column I required to hide/blank out duplicate row values and keep only the correct one:
=IF(A2<>A3,"("&A2&",'"&D2&"'),","")
Final Output required is only from Column E
ProductID Order Id Sno PlaceHolder Required Column
9353510 1212259 1 1212259 (9353510,'1212259'),
9650934 1381676 1 1381676 (9650934,'1381676'),
9572474 1381677 1 1381677 (9572474,'1381677'),
9632365 1374217 1 1374217 (9632365,'1374217'),
9353182 1212260 1 1212260
9353182 1219361 2 1212260,1219361
9353182 1212815 3 1212260,1219361,1212815 (9353182,'1212260,1219361,1212815'),
9353513 1130308 1 1130308 (9353513,'1130308'),
9353320 1130288 1 1130288 (9353320,'1130288'),
9360957 1187479 1 1187479 (9360957,'1187479'),
9353077 1104558 1 1104558
9353077 1130926 2 1104558,1130926 (9353077,'1104558,1130926')
You will notice that final values are only with the Maximum Number of ProductSno which I need to avoid duplication ..
In Your case Product could be Team and Order could be Quarter and Output could be
(Team,Q1,Q2,....),
Based on my understanding of your summary above, you want to put non-numerical data into a grid of teams and quarters.
The offset worksheet function will work well for this in conjunction with the match or vlookup functions. I have often done this task by doing the following steps.
In my data table, I have to concatenate the Team and quarter columns so I have a unique lookup value at the leftmost column of your table (Note: you can eventually hide this for ease of reading).
Note: You will want to name the input range for best formula management. Ideally use an Excel Table (2007 or greater) or create a dynamically named range with the offset and CountA functions working together (http://tinyurl.com/yfhfsal)
First, VLOOKUP arguments are VLOOKUP(Lookup_Value,Table_Array,Col_Index_num,[Range Lookup]) See http://tinyurl.com/22t64x7
In the first cell of your output area you would have a VLOOKUP formula that would look like this
=Vlookup(TeamName&Quarter,Input_List,Column#_Where_Tasks_Are,False)
The Lookup value should be referencing cells where you have the team names and quarter names listed down the sides and across the top. The input list is from the sheet you have the data stored. The number three represents the column number the tasks are listed in your source data, and the False tells the function it will only use an exact match in your putput.

Resources