Updating a column in excel - excel

I have two excel sheets with one column common for both. I need to match the column value and update the next column by following the excel 2.
for example:
I have excel1 as
A B C D
fruits 22 f.market
vegetables 50 v.market
flowers 60 l.market
excel2
A B
fruits 1000
flowers 2000
So, I need to update column D in excel 1 as 1000 where column A is fruits

You can use VLOOKUP() for fetching the respective value. Considering your data value 'fruits' is in cell A1 try to use following function
=VLOOKUP(A1,$A1$B2,2,false)

Related

Use SUBTOTAL only where column contains a value

I am currently using the following subtotal SUBTOTAL(9,b:b) to cat a total on my filtered data.
Column A contains a year of either 16,17,18 or 19.
I would like to only count the subtotal if column A contains 16 so
=if(a:a = 16, SUBTOTAL(9,b:b) or something simular
We can "fake" the SUBTOTAL() function. Say we have data like:
and we want to filter the data and only add values in column B that correspond to 16 in column A. In C2 enter:
=SUBTOTAL(3,$B2:$B2)
and copy downward. Then filter column B for positive only:
The cool thing about column C is that it is 1 if the row is visible and 0 if the row is hidden. Therefore:
=SUMPRODUCT((B2:B20)*(C2:C20))
will yield the same result as =subtotal(9,b:b) and:
=SUMPRODUCT((A2:A20=16)*(B2:B20)*(C2:C20))
will apply the column A restriction.

Vlookup string/wildcard within string

How do I lookup a string in a string and populate corresponding column from different sheet?
For example, if Sheet 2 Column A has Ford Ikon and Column B has Car and Sheet 1 Column A has Ford Fortuner, I want to populate Car in Sheet 1 Column B by matching Ford.
I want to run this at scale for multiple attributes and rows and hence, looking for a macro
Keyword Data
Input Data

Excel: How to add a column from other sheet based on a key column?

I have 2 list. Both have a lot of column. I would like to insert a column from Sheet2 to Sheet1 based on a ceratin key column. Also sheet2 have much more rows than sheet1 so it ll be inserted only partly and still there ll be elements with no matches. For an example:
Sheet1:
Names ID Car Color
John 1 Audi Empty
Andy 4 Toyota Empty
Mike 3 BMW Empty
Tony 2 Suzuki Empty
Sheet2:
ID Cost Color
6 200 Blue
3 200 Red
4 300 Green
5 100 Red
1 50 Black
I would like to get the "color" from Sheet2 to Sheet1 by using the "ID". Using Excel 2010. I suspect I need INDEX+MATCH combination, but the examples I can find are not detailed and more simple so I coudn't figure out how to use them.
How about inserting this formula on Column D in the first row, then dropping the formula down:
=VLOOKUP(B1,Sheet2!$1:$1048576,3,FALSE)
Or to find the column that contains "Color", use Index Match Match, as follows:
=INDEX(Sheet2!$1:$1048576,MATCH(Sheet1!B2,Sheet2!A:A,0),MATCH("Color",Sheet2!$1:$1,0))
This will find the value in Column B in Sheet2 and give you the row number, then it will find the Column that contains "Color" and return the Column number, with those two numbers Index will return your color.

compare 2 excel columns with data in adjacent columns

I have seen a few answers which were close to what I am looking for, but can't quite figure it out. I apologize as I am not a programmer, but am tasked with these types of things periodically.
I have a spreadsheet with data in multiple rows. I would like to compare column A with C and have them align, and then the data in B move with column A. (I can rearrange the columns if need be to make this work.
I have this:
Inventory ID# count Original ID# vendor item number
1234 2 1000 vendor 1 1234566
1456 1 1234 vendor 2 546564
7000 3 1456 vendor 3 af4566
2003 vendor 4 56778
7000 vendor 1 788asd
What I want it to look like is after:
Inventory ID# count Original ID# vendor item number
1000 vendor 1 1234566
1234 2 1234 vendor 2 546564
1456 1 1456 vendor 3 af4566
2003 vendor 4 56778
7000 3 7000 vendor 1 788asd
I have tried macros, and VLOOKUP, but can't figure out how to have the count move with the inventory ID # Thank you for your help.
I'll assume your data starts in Sheet1!A1
Move the Invenotry ID# and count columns to a different sheet (say, Sheet2). Then replace the value in cells A2 with the following:
=IFERROR(VLOOKUP($C2,Sheet2!$A:$B,1,FALSE),"")
and similar for cell B2:
=IFERROR(VLOOKUP($C2,Sheet2!$A:$B,2,FALSE),"")
Fill it down. The VLOOKUP will place your id's and counts in the right rows, and the IFERROR( ... ,"") part will put a blank string where there is no match, so it will look like you desired table
If your data starts from cell A1, insert 2 columns C and D like below,
Enter the below formula in cell C2 and drag it right to column D and then down throughout the range,
=IFERROR(INDEX($A:A,MATCH($E2,$A:$A,0),COLUMN(A1)),"")
You can then copy-pastespecial Column C and D to A and B and delete C and D.

Index Match with multiple criteria not working properly?

I have 2 worksheets in an excel workbook.
Data
Column A Column B (PO) Column C (Supplier No) Column D (Item No) Column E(date) Column F (week no)
123406121601 - 555 =LEFT(A1,12) =LEFT(A1,3) =RIGHT(A1,3) 06/12/2016 =WEEKNUM(A1,21)
I have about about 1000 rows of data like the above.
In column A, each cell contains jumbled information consisting of a PO number and item number.
The PO number is the first 12 digits in the cell in column A, and the first 4 digits contain the supplier number.
The PO also is made up of a date, i.e. 123406121601 = a date of 061016 and once formated = 06/12/2016.
My formula's give the results below:
Column A Column B Column C Column D Column E Column F
ABC123409121601 - 555 123409121601 123 555 06/12/2016 49
On the second sheet, Home, i have the following:
Column A Column b Column C Column D Column E
123 555 06/12/2016 {INDEX MATCH FORMULA}
I am wanting to lookup the po number on sheet 2 where the supplier number, item number and date match - using the formula below:
=IF(C1<>"",INDEX(Data!B:B,MATCH(1,(Home!A1=Data!C:C)*(Home!B1=Data!D:D)*(Home!C1=Data!E:E),0)),INDEX(Data!B:B,MATCH(1,(Home!A1=Data!C:C)*(Home!B1=Data!D:D)*(D1=Data!F:F),0)))
Within this formula I have surrounded 2 index match formula's inside an if statement. This means the user can check for a result/PO Number based on the supplier number and item number and a specific date or the week number that date falls within.
For some reason, this index match works fine if im using static values and keeping my rows of data relatively short. However, for some reason, either by using formulas on sheet 'data' or by having more rows of data - this causes me to get the following result
NA!
Please can someone show me where i am going wrong?

Resources