How to show specific text for duplicate row with 1 type column different - excel-formula

I would like to show if duplicate value but one type of column showing different text then return the expected result else remain the same
Seek for advise which formula is able to get this results
The formula does not work if there are multiple column between the data as image show as below:
Latest
Added more type in Column A and one more condition for column C and how to get the expected result in highlighted yellow

=IF(ROWS(UNIQUE(FILTER($A$2:$A$21;($E$2:$E$21=E2)*($D$2:$D$21=D2))))>1;"Cancel Leave";A2)

Related

Excel check if cell contains text from list and return values from list for every match

I have a list of products with Material no and Text description as visible in Sheet1 image.
Every part of the text has a defined value in another sheet.
How to get result in Sheet1 column C for each product based on its Text description and appropriate values defined in Sheet2?
Let's say I would like to parse the text and for each part of text to determine the value from another sheet and summarize this to one number.
For example:
Material 1 has A B C D in Text, formula should result with 100 => 10+20+30+40 (A=10+B=20+C=30+D=40)
etc...
I know I can use IF to check for each variant then return value with vlookup, but this is something I would like to avoid. Variants will change, their number can be pretty big therefore I would like to avoid changing formulas every time when we change Variants...
Looking by your screenshots you have a version of Excel prior to Micrososft365. In that case I think you can use:
Formula in C2:
=SUMPRODUCT(ISNUMBER(FIND(" "&E$2:E$11&" "," "&B2&" "))*F$2:F$11)

Problem extracting data from a cell populated from a formula

I imported a txt document which creates 7 columns of data. One of the data points in the document is a MAC address, however, due to the format of the txt document (and there is no way around this), the MAC address is split up into 6 columns (B-G), with all other pertinent data (non MAC addresses) existing in column B.
I am trying to write a formula to check a cell in column B, and if it contains "BSSID" then it will combine the text in the corresponding row from columns B-G and enters the new value in column H (so it shows as a normal MAC address). If the cell does not contain "BSSID", then the value of that cell just needs to be moved to the corresponding row in column H.
MY PROBLEM IS given the formula below, if the cell contains "BSSID", the corresponding row in column H will only display the value of the cell in the first column, instead of all the columns.
I have tried taking the code, that combines cells in B-G within the formula, and surrounding it in brackets and quotations, with no luck.
I also tried making this a multiple step solution by only running the formula to combine everything in column H, and then in column I, via a formula.
I tried to move the value returned in column H to column I, but I run into the same issue.
And I have tried swapping the return values, just to make sure, I didn't mix up the true return with the false return.
Original Code I would like to get to work:
=IF(ISNUMBER(SEARCH(“BSSID”,A2)),B2&":"&C2&":"&D2&":"&E2&":"&F2&":"&G2,B2)
This is what the code looked like, when I broke it into 2 parts:
Column H: =B2&":"&C2&":"&D2&":"&E2&":"&F2&":"&G2, B2
Column I: =IF(ISNUMBER(SEARCH(“BSSID”,A2)),H2,B2)
Both codes only return the value in cell B2 if true, instead of what should look like a MAC address.
My expected results would be, in a single formula, if B2 contains the string "BSSID" that H2 would show the content of B2-G2 formatted to look like a MAC address; and if B2 does not contain the string "BSSID" then H2 will show the content of B2.
Actual result is that H2, when the formula returns true, only displays B2 and not B2-G2.
I would approach this problem as follows:
Check the cell for BSSID using an IF statement =IF(SEARCH("BSSID",A2), <true>, <false>)
This statement may result in an error though, if "BSSID" isn't found. Your code looks to be fine, but perhaps herein lies the issue. To be sure, we can insert a catch for the errors using IFERROR =IF(IFERROR(SEARCH("BSSID",A2), FALSE), <true>, <false>)
Then, within the <true> section of the IF statement, I would use TEXTJOIN to combine my cells with a colon inbetween ...TEXTJOIN(":",TRUE,B2:G2)...
EDIT: I notice that you say in one location that you are checking cell A2 for "BSSID" and in another you say you are checking cell B2. Perhaps make sure you aren't checking the wrong cell?
=IF(ISNUMBER(SEARCH(“BSSID”,A2)),B2&":"&C2&":"&D2&":"&E2&":"&F2&":"&G2,B2)
...
My expected results would be, in a single formula, if B2 contains the string "BSSID" that H2 would ...

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.

Excel Formula Vlookup, Index and Match

I have tried a few iterations of Vlookups, Index and Match but can't figure out how to solve the following.
Example Image of the desired result
I have three columns Name, Match Field and Result. I need a formula that will look at the values in Match Field and if the value is found in the Name Column it will Write the name of the Match Field in the Result Column.
I have attached an Image of what I would like the result to be like.
Put this in the Result column (C2)
=IFERROR(VLOOKUP(B3&" *",A$2:B$5,1,FALSE),"")
This will match it properly (first word in column A) but it will bring in the name from Column A.
UPDATE: not a pretty one but will format as required
=IF(IFERROR(VLOOKUP(B2&" *",A$2:B$5,1,FALSE),"")="","",B2)

Excel 2 column comparison: duplicate in one column, but unique as pair

I'm trying to compare values across two columns (Product and Location) in Excel to highlight duplicates, but I can't figure out the logical test. I'm looking for rows that match three criteria:
Product value is duplicate
Product value is not blank
Duplicate 'Product' values occur with different 'Location' values
(Products with the same value in the same location are assumed to be distinct for a value I don't have, but products with the same name at different locations may be duplicate).
Edit: I want the formula to evaluate to true only if the same Product occurs in more than one Location.
I can figure out the first two conditions by themselves, but can't figure out how to incorporate the third. I've sorted the table so that the duplicate values should appear next to each other, but there are too many to check by eye.
I'm currently using this logical test for conditional formatting using the first two criteria. 'Product' occurs in column C, 'Location' occurs in column I.
=AND(C1<>"",COUNTIF($C:$C,C1)>1)
Given your criteria, I think what you need would be the CountIfs function for the 3rd criteria....
Your final formula would look as follows:
=AND($C1<>"",COUNTIF($C:$C,$C1)>1, COUNTIFS($C:$C,$C1,$I:$I,"<>" & $I1)>0)
In effect, your third criteria is saying Count if the product matches C1 AND the Location does NOT equal I1
Hope that does the trick!
NOTE:
The more I think about it, the more I'm pretty sure you do not need your second criteria... I've been trying to think of an example where your second criteria would affect the result of this final outcome, but can't find one....
Just something to consider....
It might be overkill, but how comfortable are you with PivotTables?
Insert a pivot table, and put the "Product" in the row, with the data as the "count" of Location.
Then add a column with a formula similar to:
=GETPIVOTDATA("Location", <top left cell of pivottable> ,"Product", <cell that has product you want a count of>)
The "Location" and "Product" text would have to match your column titles.
The easiest way to get the forumla right is to type "=" in the cell you want to have the value in, and then click on the pivot table cell that contains the value. You then replace the static text, with the cell that has the value you want to look up.

Resources