Comparing two columns in gsheet - google-sheets

I have two columns that I have imported from 2 different files named as Listing Id and LID. These two columns contain same type of data and I want to find the common value from the column and stored in third column matching LIds which i did using Vlookup. Now corresponding to each column i.e Listing Id and Lid there is inventory id. What i want is to copy the data of LID correspondence inventory id in the Listing id correspondence Inventory. How can I approach this problem? I have tried with match() function but not geeting the way out.
Here is screenshot of the problem
enter image description here
enter image description here
As it can be seen that listing_id in red has corresponding inventory value and listing id in blue have corresponding inventory value. The problem is that there exist some common listing id (in blue and red as well)for which there is no available data of inventory value in blue. I have to get it from red inventory value and update it to blue.

Related

I would like to Automatically sort a Google Sheet highest to lowest, then remove duplicate values

I have a google sheet that contains an inventory list that include manufacturer and model id's. Each line item contains a price and the amount the product is discounted below MSRP. I have the raw information dumping into a spreadsheet daily but I need the sheet to automatically sort the sheet by the make/model/highest discount value and then remove the duplicates (Removing all of the lower make/model/discount values). I could easily do this task manually but I am hoping to find a scaleable way to perform this tasks for many different lists.
To get UNIQUE Id's paste this formula in F2.
=UNIQUE(A2:A)
In G2 Paste this formula and drag down.
=IF(F2="",,SORTN(FILTER($B$2:$D,$A$2:$A=F2),1,,4,0,3,0))
Note: duplicates are highlighted in yellow and green

Have multiples values from one condition in Google Sheets

I have set up a Sheets file to have a list of the personnel of a company. Each line corresponds to a person and each column to a data of this same person. There is the date of entry in the company, the name of the person, his first name, his department, ...
I am trying to set up indicators and one of them is a problem. I would like to have the list of departments for people who joined the company on a given date (link). Thanks to the formula in F2 in the previous file, I can obtain the value of line 2 but I would like to have all the values at once without having to apply my formula to each line.
Try this out
=filter(D2:D;A2:A=today())

Create dropdown list from data tab (conditional)

Not sure how to phrase this correctly, but I can't get my head around the next thing;
I have a Google Sheet with two tabs. One tab showing the data based on the selected parameters (ID and Category) and one tab with all of the data.
The data consists out of one ID and up to 4 categories with each category having 3 unique values. When selecting an item ID in the first tab, it should generate a dropdown list with all of the Category names of the item with the same ID from the data tab. It should only pull the categories which are not empty. Once an ID and one of the categories is selected in the first tab, it should pull the 3 unique values of that specific Category and display it in the first tab.
Tab 1
The dropdown list in the first cell is simply the range of all the values in the 'B' column of the data tab. Once an ID has been selected in Tab 1, it should automatically generate a dropdown list including all Category Values (if not empty). In the example below it should create a dropdown list with the values "Example 1 and Example 2". If there would be a value below Category 3 it should create a dropdown list with 3.
Once the ID and the Category has been selected, it should pull the corresponding First, Second and Third value from the selected category.
Data tab
There are several ways to achieve this behavior, but I would suggest using the =FILTER function (you can read more about it here).
I have set up my mock Data tab as follows, but of course this method can be easily adapted:
You can see that I am listing all the ID-Category combinations and their corresponding value (I presume there are several Categories per ID).
Now to the main tab:
For the ID column a simple Data Validation can be done. You can select all the IDs in the Data tab, the duplicates will automatically be thrown out. This can easily be achieved by:
=Sheet2!$A$2:$A$7
For the Category validation in the second column, an extra step is needed because natively populating drop-down lists (to dynamically adapt the Category drop-down to the current selected ID) is not [yet] supported. However, it can still be achieved will the following trick:
Where the formula used in the helper for validation is the following:
=TRANSPOSE(FILTER(Sheet2!B$2:B$7,Sheet2!A$2:A$7=A2))
and in the catergory data validation we have the following range:
=G2:2
For the different values, we can again make use of the FILTER formula. You can paste this into the C2 cell and extend it to as may columns and rows as required:
=FILTER(Sheet2!C$2:C$7,Sheet2!$B$2:$B$7=$B2,Sheet2!$A$2:$A$7=$A2)

Using Unique and Highest Entry in Column

I created a check-in/check-out system for equipment using a form. I'd like to pull data from the Entries tab to the Database tab. Id like the Database tab to contain ALL unique values in column C based on the highest value in Column A.
Here is the formula I'm using that is not working:
=ARRAYFORMULA(IFerror(VLookup(Unique(sort(Entries!C2:C)),Sort({Entries!C2:C,Entries!A2:G},4,1,2,0),{2,3,4,5,6,7,8},0),))
Here is a link to the sheet. The Results tab is my desired results.
https://docs.google.com/spreadsheets/d/1ChaLBNtDJwTl73nMaCkKqh7DT-TuVLt8wm7Yj0KQLMM/edit?usp=sharing
The easy way to do these is with SORTN:
=sortn(sort(Entries!A2:G,1,0),999,2,3,1)
so first sort descending on Entry ID so that the latest ID's come first, then sort ascending on Equipment specifying 'remove duplicates' so that only the first (latest) ID is kept for each Equipment value. '999' should be increased if there are more than 1000 rows in your sheet.
Your formula also works, except that the dates come out as numbers and have to be formatted separately

Gather employee information scattered in two tables

I have a problem with Spreadsheets. In one of my sheets, I have two tables. The first contains the employee ID and the total hours; and the second has for each employee, his/her name and ID. Example:
!
I am trying to figure out a formula to look through the second table and if it sees a certain employee ID then it will assign that employee ID with the person's name. I would like to keep the column that lists the employee ID but to have a formula that places the person’s name near to his/her ID. The problem is that I do not know how to stick such information. For instance, in D4 should appear "Ben Hale" because the employee ID of E4 matches with the ID that appears in E25.
The expected output is in red (except the value of E18). I want to obtain such output using formulas.
Please try:
=index(F$22:F$37,match(E3,$E$22:$E$37,0))
copied down to suit.
In addition to the valuable contribution of pnuts, you could also use enter the following in D4:
=ArrayFormula(vlookup(E3:E17, E22:F37, 2,0))

Resources