Compare col 1 and 2 with another table - excel-formula

How can I compare 2 columns from one sheet with another sheet and copy the 3rd column from the 2nd sheet to the 1st sheet?
If no data found and match, a word of "error" should be shown.
=VLOOKUP(E4&F4,$AP$4:$AQ$125,3,0)

Lets see if I understood your right...
I did not bother separate the tables on two sheets just ad sheetName! before any address to make it work.
on a Swedish machine
=IF(MATCH(A2;F:F;)=MATCH(B2;G:G;);INDIRECT("H"+MATCH(B2;G:G;));"error")
This function is more international i suppose
=IF(MATCH(A2,F:F,)=MATCH(B2,G:G,),INDIRECT("H"+MATCH(B2,G:G,)),"error")

I am using this formula:
=IF(MATCH(A2,F:F,)=MATCH(B2,G:G,),INDIRECT("H",+MATCH(B2,G:G,)),"error")
and I have this result:-
enter image description here

This formula solved the problem.
=IF(AND(E4="",F4=""),"",IFERROR(INDEX($AR:$AR,MATCH(1,INDEX(($E4=$AP:$AP)*($F4=$AQ:$AQ),0),0)),"No Found"))
Thanks.

Related

Can I use VLOOKUP to join data in my Excel document?

My excel document has two sheets, sheet 1 has the names of car manufacturers on it and sheet 2 has those same names with their relative ID (this is a database that it's taken from).
Sheet 1
Name
Ford
Accura
Holden
Sheet 2
Id Name
1 Ford
2 Accura
3 Holden
I'd like to be able to lookup sheet to and match the strings to get the Id of the car manufacturer from it. I tried using VLOOKUP but I cannot get it to work.
Let's assume that on Sheet1 the name column is D2 (not including title of course) and that the sheet I want to lookup is called "CarMakes" in which the data is B3:C17 (not including titles)
I wrote my vlookup in the following way:
=VLOOKUP(D2,CarMakes!B3:C17,2,TRUE)
However, this gives me a result of '#N/A' so I think my approach is wrong. Can anyone help me with this and is vlookup the right way to do it? Also, can I perform these sam operations by connecting to my database which is in Azure?
You need INDEX()/MATCH()
=INDEX(CarMakes!$A$2:$A$4,MATCH(A2,CarMakes!$B$2:$B$4,0))
If you have Excel365 then can try XLOOKUP().
=XLOOKUP(A2,CarMakes!$B$2:$B$10,CarMakes!$A$2:$A$10)
Use $ before coordinate
=VLOOKUP(D2,CarMakes!$B$3:$C$17,2,TRUE)
That should help.

Sum of all values in the corresponding cell, against a particular calendar month and Company

An excel sheet contains an array of repeating "calendar months" in Column-1, an array of repeating "Company Names" in Column-2, and an array of Numerical Values in Column-3.
(1) What is the sum of all values in Column-3 for any random company for any random month?
(2) what is the sum of all values in Column-3 for any random company up to its previous month?
However, I found the solution for Question (1), but unable to find the solution for Question (2). Thank you very for your help in Advance!
I have uploaded the file.
https://www.dropbox.com/s/31e85g5j0njsxr8/Solve.xlsx?dl=0
Going off my previous answer, give this a shot.
Worksheet here
Let me know if you have any questions.
Since I don't know how your data looks like I'm giving general solution.
It looks to me that you can use a simple sumifs formula for your described problem.
=SUMIFS(D1:D10,C1:C10,"<"&DATE(YEAR(A1),MONTH(A1),1),B1:B10,"="&A2)
Based on my answer to your last question, you can just add other conditions to the SUMPRODUCT like:
=SUMPRODUCT((MONTH(DATEVALUE("01"&A2:A55&"2018"))<MONTH(DATEVALUE("01"&$B$1&"2018")))*(C2:C55)*(B2:B55="XYZ"))
Array Formula: press CTRL + SHIFT + ENTER

Excel formula to extract yes

I have an excel sheet with different columns with all have the value Yes or No. I want in my last column a formula that extract a result of all the previous columns.
If all the values are No, the result has to be No
Is one or more values Yes, the result should be Yes
I don't know which formula I can use for that. Can someone help?
=IF(COUNTIF(A1:C1,"Yes") > 0,"Yes","No")
Change A1:C1 to the range of interested columns
Try using OR function. you can get syntax https://support.office.com/en-us/article/OR-function-7d17ad14-8700-4281-b308-00b131e22af0
You just need nested OR functions for each column. Here's a sample with 3 columns:
=OR(A1="yes",OR(B1="yes",C1="yes"))
For additional columns, add another OR around the existing, with one argument testing the this code, and then add your new column as the other argument.

compare a part of a cell with the another column

I need a help with excell tables. I need to compare a only part of a cell with another column actually I need to see if the data exists.
The cell part would be the first 4 letters left(s2;4) with b1:b1000
I have tried with:
=IF(AND(LEFT($B$1:$B$1000;4)=LEFT(S2;4));"match";"no match")
but it doesnt seem to search thorough the whole column $B$1:$B$1000 but it compares s2 with b2
Thanks
If you are just trying to see if the string exists in the search list (presumably B1-1000) - this should work for you.
=IF(COUNTIF($B$1:$B$1000,"*"&LEFT(S2,4)&"*")>0,"Match","No Match")

How do I search across sheets in Excel

I want to transfer data automatically from 2 sheets to one single combining one. That means I have 2 different exports that contain both the columns "Problem". I have one sheet, that represents an overview of the data. So when I have for example the value "A333" in A1 of my overview sheet, I want Excel to search in the two other export sheets the value "A333" and give back the value in the same row as "A333" but of the column "Problem" not "A".
The problem that I see is that I have to search TWO sheets and I don't know in which one the "A333" will appear.
Can you please help me? I would preferably like to solve the problem with a formula, not a macro. Thank you very much in advance.
1) write a formula (VLOOKUUP() for example) that looks for the value in the first sheet
2) write a formula that looks for the value in the second sheet
3)since VLOOKUP returns an ERROR if a value is not found you can combine the formulas together using IFERROR(). for example: =IFERROR(VLOOKUP(ref_cell,sheet1_range,2,0),VLOOKUP(ref_cell,sheet2_range,2,0))
EDIT:
It looks like you did not provide all the pertinent information in your question!
I suggested VLOOKUP(), but this will only work if you know which COLUMN the value you are looking for will appear in, but you said this is not the case...
using you comments I therefore assume the following:
the two test sheets are called "test1" and "test2"
The reference value we are looking for is in cell A5 on the main sheet, cell D1 on the sheet contains "Problem" (text)
The reference value may appear anywhere (I limit here to range A1:J100) on test1 or test2, but ONLY ONCE
The column "Product" on test1 and test2 may appear in different columns, but it will always have a heading "Product" in row 3 (test1!A3:J3 and test2!A3:J3)
see below of screenshot of the answer (column C shows result, column D shows the underlying formula)
If required use the information provided to create a single-cell formula (because Stack Overflow is not a we-write-the-answer-for-you service)
Following the scheme:
and add the formula:
E3 -> =CONCATENATE(IFERROR(VLOOKUP(D3;$A$12:$B$15;2;FALSE);"");IFERROR(VLOOKUP(D3;$A$3:$B$6;2;FALSE);""))
and autocomplete ...

Resources