how to set value on one of column on excel from other sheet column on excel - excel

I have two sheet of excel one it is sheet for products
with have column like this
id
name
barcode
description
1
opel blazer
1239423
europe car
2
toyota alphard
9239239112
japan car
3
Jeep
90232321
Jeep
this sheet has 1000item and barcode
and other it is sheet for inventory
id
product_id
barcode
location
1
????
9239239112
40
2
????
90232321
20
my question is how to set product_id at my inventory from id column from product sheet if we just has information for barcode ? so it will be use filtering and set by barcode

Try below formula-
=INDEX(products!A:A,MATCH(C2,products!C:C,0))
With Microsoft-365 can try-
=XLOOKUP(C2,products!C:C,products!A:A,"")

Related

How to copy a column from one sheet to another in MS- Excel, with ID as reference

I have 2 sheets in one excel file. I'd like to copy only the team column from sheet 2 to sheet 1. Both sheets have matching ID to relate to each other.
Sheet 1
id
name
address
team
123
Paul
1st street
456
Kyle
2nd Street
Sheet 2
id
name
team
123
Paul
CL
456
Kyle
BSM
And then sheet 1 will now look like this:
id
name
address
team
123
Paul
1st street
CL
456
Kyle
2nd Street
BSM
I don't know where to start. I know though that this can be done in excel, and you can do programming on it. I don't want to manually input it since it's more than a hundred records.
Okay so I am assuming all the headers are in first row. This can easily be done through Vlookup
=VLOOKUP(A2,Sheet2!A:C,3,FALSE)
Put this formula in column team in Sheet1. It will work.
Let me know if you need any further clarification.

Get record from another sheet when value selected from dropdown

I am using Excel 2007
I have two sheets. 1) Orders And 2) Products
Orders :
A B C D E
Sr No particulars quantity rate amount
-----------------------------------------------------------------
1 Dropdown from
Products B2:B50
------------------------------------------------------------------
2 Dropdown from
Products B2:B50
------------------------------------------------------------------
....... And So On.....
Products :
A B C
---------------------------------------------
Sr No ProductName Rate
---------------------------------------------
1 ABC 440
2 DEF 210
3 XYZ 185
...... And SO On...
In Orders Sheet, In Particulars, Dropdown box is generated with productnames in Products Sheet with Data Validation.
I want to autofill Rate of Product Selected from dropdown in Orders sheet
I tried VLOOKUP... But without success
I guess that in your "Product" sheet it will not be duplicated a Vlookup works.
For instance ABC remains 440 as rate? Then you can have your "quantity" x "rate" to get your amount. What have your tried in Vlookup and what error?
Try this in Orders sheet cell D2
=VLOOKUP($B$2,Product!$B:$C,2,FALSE)

Customer has multiple rows and want to combine them in Excel

I have order data that breaks up orders by each individual item in the user's cart. This means that if a customer purchased 3 items, then they would have 3 rows in my spreadsheet. What I'm hoping to do is ONLY have 1 row per customer. Below is what my data currently looks like:
Customer Name Item Number Item
Derek 1 Shirt (Blue)
Derek 2 Shirt (Red)
Derek 3 Shirt (Yellow)
Amy 1 Shirt (Red)
Amy 2 Shirt (Yellow)
I would ideally like my data to looks like the following:
Customer Name Item Item 2 Item 3
Derek Shirt (Blue) Shirt (Red) Shirt (Yellow)
Amy Shirt (Red) Shirt (Yellow) BLANK
I have roughly 1000 customers in this dataset and around 5000 rows currently. Is there any way I can do this in Excel? My idea is creating a new table with a column named "Customer Name" and columns named "Item 1", "Item 2", etc. In the item 1 column, I use a formula that looks for the Item name if Customer Name in my new table matches the customer name in my original table AND the item number = 1. Then do the same for column "Item 2". I'm just not sure how to go about this.
Any help would be greatly appreciated. Thanks!
You need formula to filter data based on condition. You can use AGGREGATE() function with INDEX() formula to filter data based on condition to achieve your desired result. As per below screenshot put below formula to B10 cell then drag across down and right as need.
=IFERROR(INDEX($C$1:$C$6,AGGREGATE(15,6,ROW($1:$6)/($A$1:$A$6=$A10),COLUMN(A$1))),"")

Excel: Matching Data in Excel. Writing an IF statement by dragging instead of manually inputting

I have two sheets. Both sheets contains two columns with Countries and Price #s. The first sheet does not have info for the Price # but the second does.
Sheet 1:
Country|Price #
Canada | Null
Brazil | Null
Spain | Null
Canada | Null
Sheet 2:
Country|Price #
Canada | 1
Spain | 2
Brazil | 3
Austria | 4
Goal: I want to fill out the Null values in sheet 1 with the corresponding numbers in sheet two. For example a 1 for Canada, 3 for Brazil, etc.
If I didn't have much data, this would be an easy IF statement in the Null cell. For example
' =IF(B2="Canada",1, IF(B2="Spain",2,IF(B2="Brazil",3,4)))
Problem is that my data contains over 50 countries so it would be tedious to write this formula. Is there a way to use the drag feature in Excel to do this? Also open to not using an IF statement.
Or you can use SUMPRODUCTif you need return numbers only:
=SUMPRODUCT(--(D1=$A$1:$A$4)*$B$1:$B$4)
Sheet2:
Sheet formula Pict 1:
Sheet Formula Pict 2:
Here the formula to be copied, choose as your need:
=filter(if(C1:C="",vlookup(B1:B,Sheet2!A1:B,2,false),""),B1:B<>"")
or
=filter(vlookup(B1:B,Sheet2!A1:B,2,false),B1:B<>"")

How to automatically fill up information on sheet 2 when information is input in sheet 1

I have a sheet of data whereby if the column is of certain value, it will return the whole row of data in another sheet. Example table as below.
PIC Name Phone number Gender Nationality
Ali Sad 123218972 Female US
Fahril Sam 435262626 Female US
Abu James 26426426426 Male US
I'm not too sure of the formula to output with the condition of when PIC=Ali, whole row will be returned on sheet 2. Given the extra condition of Ali might have in charged for more than 1 person. Assuming PIC is A1. Result will be as below in sheet 2
Name Phone number Gender Nationality
Sad 123218972 Female US

Resources