Validation by Using CONCAT in COUNTIF - excel

I want to concatenate the value of two columns in the current sheet and then result should be compared with the concatenation of two column value in another sheet.
e.g - The entered value in Column W and X in current sheet after concatenation should be compared with the existing value in column Y and column Z(after concat) of another sheet.
I have tried using the formula COUNTIF(Sheet2!CONCAT($W$2,$X$2:$Y$2,$Z$2),A2)>0 and some different alteration in this but it seems COUNTIF has range and criteria as argument and this is string which is causing error.

If you want to compare, a simple '=' will do.
Concatenation can be done using '&'.
in current sheet:
=W1&X1=Sheet2!Y1&Sheet2!Z1
will return TRUE if both concatenations are equal and FALSE if they are not.
To find the value W1&X1 in the entire range, I suggest you use a help column (unless you are willing to write a macro). In the help column of sheet1, you concatenate the values (=W1&X1 - drag down). In the hlep column of sheet2 you do the same. Then you make an additional column to check for matches, by using
=match(ValueHelpColSheet1,HelpColSheet2,0)
This formula returns the row number in which the match is found and an error when the corresponding value is not found. You can replace this error with something else using IFERROR if you want to.

Related

check multiple cells value in a sorted list have same value as another manual cell

How to write a formula in excel that based on critria it can check if list of multiple result cells have same value.
I attached example:
Look for all cell with the number 100
Verify that the list of these cells contain same date value of one cell.
I try to use formula such as: COUNTIF + INDEX and MATCH but didn't work as expacted.
I'm guessing you can use =ROWS(FILTER(....)) but what I would do is create a hidden column that evaluates it per row, maybe with something like
=IF(A2="","",XLOOKUP(A2,A$2:A,B$2:B)=B2)
and copy that formula down the column.
This way, you can not only see if there are any bad values (by COUNTIFS for false values where the A-column's value matches the "find these cells" value) but apply conditional formatting as well to highlight the bad values.

Use a combined formula to return the value of a cell

I am trying to obtain the value of a cell that is in a different sheet, from a formula that returns the value of the row where it finds a match.
Basically, what I'm trying to imitate is:
=Sheet!Column Row
But as follows
=Sheet!Column Formula (Which returns the row that meets the conditions of the formula)
The problem is that I tried concatenating the name of the sheet, the column and the result of the formula (row), which works, since I get, for example:
=Risks!K3
But that's all, I get a kind of string and in reality I would need that result to also be calculated by excel and return, precisely, the value of cell K3.
Is there any way to solve it?
Use INDEX:
=INDEX(Risks!K:K,formulathatreturns3)

How to compare one cell with a range and if TRUE - copycontent from the right cell?

I need to compare two columns I and L and copy matched result from M column. It is a list of 1000+ product codes (I,L) and EAN codes (M). So if cell I1 is found in range of L1:L1000 (lets say it found in L3 cell), then formula should copy the M3 cell.
Tried VLOOKUP and MATCH and some IF, but cannot figure it out how to make it work as it returns blank or REF! or N/A or errors-out completely. I'm desperate and don't know what i'm doing wrong...
=VLOOKUP(I1:I1164,L1:L1164,13,FALSE)
and with
=IF(ISNUMBER(SEARCH(I1,L1:L1000),M1," "")
Result should be in N column.
When using VLOOKUP, you need the lookup range to include both the range of values you're looking for (which MUST to be the first column) and the return values (whose column you specify as relative to the range. So in your case, you'll be looking up in L1:M1164 and using column 2 as return results (since column M is the second of L1:M1164).
Also, the value you're looking for will probably be just an item, relative to the current line. I'd thus try it that way (in N1):
=VLOOKUP(I1;$L$1:$M$1164;2;FALSE)
Wrapping it up in an IFERROR as suggested in SJR's answer might be a good idea too.
Try this
=iferror(index(m1:m1000,match(i1,l1:l1000,0)),"")
The match bit returns 3, the index bit then looks for the 3rd value in column M; the Iferror returns an empty string in the event of an error (i1 is not found).

Excel VBA/Formula to find a cell that includes search term?

I was not sure how to really create the question...
But the problem I am having is this: I have a list (in rows) that relate to a regulatory document, and after trying to create some sort of for loop or elaborate VLookUp/Index formula, I'm requesting help.
For example:
Now I want to use the rows to find the corresponding section in the document. I've already extracted and formatted the compliance document so it is in excel format.
So what I really need is this: a formula or VBA script that can
1. take the compliance number (for example 1A-1 which exist in Cell A3) and go find a cell (in single column D) that has JUST 1A-1, not 1A-1.1, not 1A-1.1.2, etc. and return it to the adjacent cell to 1A-1, for example.
Many thanks ahead of time... I am so lost!! :/
VLOOKUP vs INDEX/MATCH
You can do the 'lookup' two ways (that I'm aware of):
Using VLOOKUP:
The B3 cell contains your formula
=IF(ISERROR(VLOOKUP(A3,C:D,2,FALSE)),"",VLOOKUP(A3,C:D,2,FALSE))
where 'FALSE' is indicating there has to be an exact match and the data doesn't have to be sorted.
Using INDEX with MATCH:
The F3 cell contains the Index/Match formula
=IF(ISERROR(MATCH(A3,C:C,0)),"",INDEX(D:D,MATCH(A3,C:C,0)))
where '0' is indicating there has to be an exact match and the data doesn't have to be sorted.
INDEX/MATCH preferable!?
The MATCH function finds the position (row number if whole column is used) of the found match. This way (there's another) of using the INDEX function uses exactly this found match to return a cell's value in that position (row) in ANY specified column range (column). So they are the ideal combination.
With the VLOOKUP function you have to additionally specify the column index (range_lookup) of a range which could get complicated when the columns aren't adjacent as in this case. Most importantly, the function doesn't work if the lookup data is to the right of the match data.
VLOOKUP NOT WORKING! INDEX/MATCH STILL WORKING!
try this formula
The formula in cells
B2: =INDEX(E:E,MATCH(A2,F:F,0))
C2: =INDEX(G:G,MATCH(A2,F:F,0))
MATCH(A2,F:F,0) is finding Cell A2 in column F (0 means it will find
exact match) and will return the first row number when it would find that
INDEX(E:E,MATCH(A2,F:F,0)) will return contents of column E where row number is returned by the Match formula

Multiple Conditional If Statements in Excel to Return Single Value [duplicate]

I am trying to populate B2:D5 with "yes"/"No" ( Figure 1) based on the criteria that if I find the respective pvalue( Column A) , in the 'Test' column in a separate sheet and the Fvalue matches the column header of figure 1. I tried using the formula visible in figure 3. However, it incorrectly labels the cow and chicken columns. Which I suspect is due to it stopping at the first " True" value it finds, and not iterating over the other values once it finds said true value.
Use COUNTIFS()
In B2:
=IF(COUNTIFS(Sheet1!A:A,$A2,Shee1!B:B,B$1),"Yes","No")
Then copy over and down the grid.
Where Sheet1 is the list.

Resources