Excel Comparing Cells in Different Sheets - excel

i have this problem2 days now if anyone could help me
sheet 1
col A col B C(price) D E(barcode)(1000 entries)
sheet 2
col A col B C(price) D E F G I(barcode)(10000 entries)
i want to make a formula that compares col E(sheet 1) and col I (sheet 2) and if they are the same the result is to replace the price of col C(sheet 1) with the price of col C(sheet 2).
if that is not possible, then to show the price of col C(sheet 2) to a new Col F of sheet 1
Thanks in advance.

You should use Index and Match combo to get the price from sheet 2
=INDEX(Sheet2!C:C,MATCH(Sheet1!E2,Sheet2!I:I,0))
To make sure that no #N/As are displayed, just add Iferror like this:
=IFERROR(INDEX(Sheet2!C:C,MATCH(Sheet1!E2,Sheet2!I:I,0)),"")

Related

Is there a way in excel functions to search a column, and output the cell adjacent to it?

1 some items
2 price
3 all items
4 new price
a
1.00
a
c
2.50
b
d
1.25
c
In the above excel sheet example, is there a way to populate the "new price" column with the corresponding price of the same item, when the item lists do not match up? I've been trying to use the if then function like so :
if (a in column 3) matches (a in column 1) then (new price = cell right of a column 1) else (new price = 0)
I've managed to get it to work for rows where the item in the first and third columns are the same, but I can't figure out how to tell excel to search a column. So when c in column 3 and c in column 1 are on different rows, it just errors out. I need a function that will take item c in column 3, find item c in column 1, and then look at the price for item c and apply it to the new price column.
Thank you!

Can you match or search with cell matching part of another?

I'm trying to create a formula in Excel where I can use an Index / Match formula where I'm searching for only part of one cell.
For example:
Sheet 1
Column A --> Full Name
Column B --> Removed status
Col A
Col B
Col C
Col D
Col E
1
Col D + Col E
Removed status
agent #
Agent F Name
Agent L Name
2
Sheet 2
Column A --> Sheet 1 Column B --> only if Sheet 1 Column A is part of Sheet 2 Column D
Column D --> Full Name 1, Full Name 2, Full Name 3
Col A
Col B
Col C
Col D
Col E
1
Sheet 1 Col B
AutoP status
Carged
Name 1, Name 2, Name 3
Notes
2
So, I'm hoping to get a formula to display Sheet 1 Column B into Sheet 2 Column A only if Sheet 1 Column A can be found as part of Sheet 2 Column D.
Is this even possible?
If you want to search for part of one cell, you can use find formula which search for given text within cell value find(text,withintext) and it return index that the text start with and error if not.
And if you need your process to be work line by line,
the final formula ( for row2 of sheet2 column A ) would look like this:
=IF(AND(NOT(ISERROR(FIND(Sheet1!A2,Sheet2!D2))),Sheet1!A2<>""),Sheet1!A2,"")
if row2 of column A of sheet1 is not empty and is found (no error returned);the value of sheet1 column A returned otherwise empty will returned.
Hope that was useful.

VBA Create filter for multiple columns

good night!
I'm new in VBA and my english isn't that good so, please, be patient with me =D
Since I'm new, I always did simple loops, with one column. I never had to do a filter before. So I confess I have no idea where to begin. But I'll try my best to explain, so please, help me because it's really important to me.
I need to create a loop in the first 5 columns with this logic:
1 - Search all 5 columns and create a filter;
2 - Filter: Get all rows of column A where value == 1 And all rows of column B where value == 1 And all rows of Column C where variable == 'C' And all rows of column D where values == 1 And all rows of column E where value == 1 and create another sheet(1) with all rows of the filter;
3 - Do loop 2 again, but with "J" on column "C", and create another sheet (2);
The logic is: I need to create one sheet with all the rows that I set in the filter.
Example: Find all rows on the Columns where Column A = 1 & Column B = 1 & Column C = F & Column D = 1 & Column E = 1 -> Create one sheet with all rows with this values
Just like that:
Note this: because I have Column C with "F" in a row and "J" in another row, I need to create one sheet with all rows that contains each letter.
Could you help me, please?
Thanks and have a great night!

Lookup a value that matches a key in one column then apply that as a key to return a value from a third column

I have values in columns G and N that have the same values, but not in the same order, so if column G and N matches, then return column L to column A. I am getting the wrong values from column L in column A.
What other information is needed besides formula below?
=IFERROR(VLOOKUP(N2,$G$2:$N$413,6,FALSE),"")
Col a Col b Col G Col L Col M Col N
ID CoID Items ItemsID ParentID Items1
45 1 Apple 45 1 Apple
Since you are trying to find the ColumnL value in the same row as you find the ColumnN value I’d suggest an INDEX MATCH combination – similar to VLOOKUP but more powerful (eg can ‘look to the left’, which VLOOKUP can’t).
=IFERROR(INDEX(L:L,MATCH(G2,N:N,0)),"")
MATCH looks for the position where G2 is found in ColumnN so that is the row number for the ColumnL value you want returned.

Spreadsheet: If row in sheet contains 2 criteria then get value of cell

Sheet 1 gets values from Sheet 2.
Sheet 2 has hundreds of rows, but only 4 columns. (Cols A & C are names, Cols B & D are numbers).
Cell XX (sheet 1): Looks in Sheet 2, For "Bill" (col A) and "Jill" (col C) where they BOTH appear in the same row, then returns number from col B (from row where "Bill" and "Jill" are found) to Cell XX in sheet 1.
If "Jill" is in col A and "Bill" is in col C - then conditions are not met, and do not return value.
How do I write this?
I am so confused. PLEASE, someone help me?
Lookup Sheet 2 For "Bill" (Col A2:A300) AND "Jill" (Col C2:C300) Get number in Col B.
One solution is to create a helper column E. Use this formula in the first row (i.e. cell E1):
=$A1 & "-" & $A3
and fill this down for the other rows. If ColA = "Bill" and ColB = "Jill", then ColE will be "Bill-Jill".
You can then do a MATCH to find out with row has "Bill-Jill", and pick up the corresponding value from ColB:
=IF(ISNA(MATCH("Bill-Jill";e:e;0));"No match";INDEX(b:b;MATCH("Bill-Jill";e:e;0)))
The MATCH formula will find out which row contains "Bill-Jill", and the INDEX formula will pick up that row from another column. MATCH will return #NA if there isn't a matching cell, and this will be captured by the ISNA check.
I'm not sure if OpenOffice supports the MATCH function - it's definitely part of Excel though.

Resources