text matching with logical function? - excel

Please help me to formulate the following formula:
Actually I am trying to make a costing sheet for recipes.. I am listing all the items in sheet 1 and on sheet 2 all recipes with their quantities of items..
sheet 1
A B
1 item price/gm
2 chicken 10
Sheet 2
A B C
1 item Qty (in gm) cost
2 chicken 150 formula?
now in sheet 2 C2 I need a formula that matches sheet2 A2 with sheet1 column A and then multiply sheet2 B2 with sheet1 B2.. and this will same for all the items in sheet2.. if I put any item in sheet2 it looks up in sheet1 and then multiply the price with qty in sheet2..

Use VLOOKUP:
=B2*VLOOKUP(A1,'Sheet 1'!A:B,2,false)

Related

Stacking two list of data on top of each other in excel

I have two excel sheets with one column each.
Sheet1
A
Fruits
Orange
Apple
Grapes
Sheet2
B
Vegetables
Tomatoes
Potatoes
Now, how do I use excel formula and populate on a third sheet stacking just the values
A
Orange
Apple
Grapes
Tomatoes
Potatoes
If your data has a header in Sheet1!A1 and Sheet2!A1 then in Sheet3!A1 you could use (and drag down):
=IF(ROW()<=ROWS(Sheet1!$A$2:$A$4),
Sheet1!A2,
SUBSTITUTE(
INDEX(Sheet2!A:A,
ROW()-ROWS(Sheet1!$A$2:$A$4)+1),
"",""))
If the row number in the new sheet is smaller than or equal to the count of rows in the range of Sheet1 then the result is Sheet1!A2:A4 if the row is greater it'll index Sheet2 column A and will get the result for in that range with the row that equals to the current row number minus the total count of rows of Sheet1!A2:A4 + 1 to take the header into account.
In Office 365 a simple =HSTACK(Sheet1!A2:A4,Sheet2!A2:A3) would do.

Excel match product id from two worksheet and take the price value

I have two worksheets,
Sheet1
ID DESCRIPTION COLUMN C
AABBCC jacket
BBCCAA shirt
CCAABB shoes
Sheet2
ID PRICE
AABBCC 100
BBCCAA 50
CCAABB 230
If the id of sheet1 match with id of sheet2 extract the price from sheet2 and write in column c of sheet1
Or use Index and Match
In C2 put
=IFERROR(INDEX(Sheet2!$B$2:$B$4,MATCH(A2,Sheet2!$A$2:$A$4,0)),"")
And drag down. Be sure to edit $B$2:$B$4 and $A$2:$A$4 to match your actual ranges.

Excel sheet formula

I have excel file having sheets month wise. more than 1000 lines items with different prices in each month. i want to make one sheet of each items segregating prices by months.
for Example,
if (column A1) item is matching to (sheet1 Column A) than put the (Sheet1 column C Value) in (column C).
Item # Jan Price Feb Price Mar Price
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
please help.
Assuming 1 is in B2 the other sheets are called Sheet2, Sheet3 etc then in C2 and copied down to suit and all the formulae copied across (presumably eleven column) to suit:
=VLOOKUP($B2,INDIRECT("Sheet"&COLUMN()-2&"!A:C"),3,0)

Formula for inserting value from Sheet 1 if word matches in Sheet 2

I have two sheets in excel.
Sheet1 has 4 columns with following pattern.
ID Name 1 Name 2 Name 3
AAA1 Ant P.Ant Ant IgE
AAA2 Peanut Peanut.IgE Peanut.IgE Serum
AAA3 Tomato
AAA4 Apple Apple.IgE
Sheet 2 has following two columns:
Name ID
Ant AAA1
Grass #NA#
Apple.IgE AAA4
Tomato AA3
Mango #NA#
I would like to check whether whole text in column A (sheet 2) exist in any of columns between B to D in sheet 1.
If yes, display ID mentioned in column A (from sheet 1) against particular row in Sheet 2.
A bit long-winded (and doesn't tally with your result for 'Tomato') but please try in Sheet2 B2 and copied down to suit:
=IFERROR(IFERROR(INDEX(Sheet1!A:A,MATCH(A2,Sheet1!B:B,0)),INDEX(Sheet1!A:A,MATCH(A2,Sheet1!C:C,0))),INDEX(Sheet1!A:A,MATCH(A2,Sheet1!D:D,0)))

Find value in 2D array and return value in adjacent cell

**Sheet 1**
ColumnA B C D E F G H
------------------------------------------------------------
EURUSD 1.2765 1 ACCOUNT624 2 account125 1 account834
EURCAD 1.01 2 Account49 3 account45 2 account67
EURGBP 0.78 2 Account777 1 account45 2 account678
**Sheet 2**
ColumnA B C D
---------------------------------------
EURUSD 1.2765 Account 624 ?
EURUSD 1.2765 Account 125
EURUSD 1.2765 Account 834
EURCAD 1.01 Account49
EURCAD 1.01 Account45
In Sheet 1 above each row shows a currency trade and what quantity goes to each account.In Sheet 2 each row shows 1 account only. I would like to populate columnd D in sheet 2 with the quantites from sheet 1.
Breaking it up into steps, i would like to:
Find the price in Sheet2!B1 in sheet1
On the same row in sheet1, find the cell containing the same account as Sheet2!C1
Return value in cell to the left of cell with matching account
I have used index/match before but I can't get it to work for 2 dimensional arrays. Can anyone help with a formula? Thanks in advance!
It's not pretty, but using what you requested - to find the match based upon price in column B (I would say your safer bet would be to use the Currency conversion "EURUSD", for example, since what if 2 currencies have the same ocnversion rate??), paste this formula in cell D1 on your second sheet:
=OFFSET(Sheet1!$B$1,MATCH(B1,Sheet1!$B$1:$B$3,0)-1,MATCH(C1,OFFSET(Sheet1!$B$1,MATCH(B1,Sheet1!$B$1:$B$3,0)-1,0,1,10),0))
You can then drag it down / change ranges as needed.
(PS - I'm also assuming you made a mistake on sheet2 and that the account numbers will be typed the exact same in both sheets)

Resources