Convert Formula Numerical Value to Matched Strings - excel

I have the following formula that checks a username against a range of usernames, determines whether that username belongs to one of three domains, and whether that username is marked as an Administrator:
=SUMPRODUCT(COUNTIFS(Tbl_Data[Username],Rng_ITEmp,Tbl_Data[Domain],{"D1","D2","D3"},Tbl_Data[Member of Groups], "*Administrators*"))
This formula works wonderfully! I'd like to dig a little deeper though and actually print out the usernames that satisfied this query. Is there a way to go from this equation to the values that came back as TRUE?

Related

FIND() formula to include "implicit intersection operator" change required

Over the weekend, my work laptop did a restart and Microsoft gave me the perfect gift in Excel, it introduced the implicit intersection operator which has completely messed up my world, literally every formula has gone crazy.
I've checked every link I can and cannot work out how to correct even the most basic formula. I would like to ask about this one so I can at least make some progress forwards.
=FIND('Value Definitions'!C3,'User Interface'!K:K) was my formula that was worked forever.
The explanation of this formula is to flag all value definitions that have been used within text of all rows in the user interface column K.
When Excel asks me to correct the formula, it rewrites it as =FIND('Value Definitions'!C3,#'User Interface'!K:K).
This results in #VALUE rather than a number of where the first occurrence was found. If I remove the # then I get #SPILL!.
Just to reiterate the purpose of the formula, I identify which phrases exist in an interface that come from the value definitions worksheet, irrespective of the number value I get (character count of first occurence), I just want to identify that it exists at least once. Then I can use this flag to lookup all related value definitions to be included on the user interface.
Thanks for your help in advance.

Excel formula on cell for valid password

I'm creating a template for importing users in bulk to the system, one of the columns requires to input password,
I would like to create a condition on the [password] cell, in order to indicate to the person that input the details that the password is valid
those are the conditions:
Password must contain at least
6 characters
1 symbol
1 number
1 letter
This is what I tried : MEDIAN(6) AND (OR),EXACT(LOWER()))) but no luck.
all the symbols are valid but the values of the characters must be in English
is it possible?
A password-validator immediately screamed 'regular-expressions'. Will you want to go down the path of VBA, you'd require the following pattern:
^(?=.*?[!#$])(?=.*?[A-Za-z])(?=.*?\d).{6,}$
See an online demo
To mimic this in relative easy native functionality you could go with xpath-expressions:
=NOT(ISERROR(FILTERXML("<t><s>"&LOWER(A1)&"</s></t>","//s[translate(.,'abcdefghijklmnopqrstuvwxyz','')!=.][translate(.,'0123456789','')!=.][translate(.,'!#$','')!=.][string-length()>=6]")))
translate(.,'abcdefghijklmnopqrstuvwxyz','')!=.] would mimic the positive lookahead for any letter;
[translate(.,'0123456789','')!=.] would mimic the positive lookahead for any number;
[translate(.,'!#$','')!=.] would mimic the positive lookahead for any symbol (as given in the character class);
[string-length()>=6] would mimic the 6+ characters needed for valid input.
Well, I have done this in the few minutes between posting the comment and this answer, you can expand it to include whatever other conditions you want:
and(len(A1)>=6,MAX(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},A1,1),"")))
is the formula used in the data validation. Youi can see that A1 meets the length >=6 but I have not controlled that the count of numbers, hiowever you can add that.

Comparing value similarities in Excel

I have 3 columns in Excel that I'm trying to compare against.
E.g.
I want to make sure that the email address should be more similar to Enquirer Name than it is to Client Name.
My current formula looks at if Enquirer Name differs to Client Name, then show me email addresses that match more than 5 characters with Client Name, which doesn't quite eliminate enquirers related to clients where their email address satisfies the equation.
Is Excel capable of returning something like Enquirer-Email match 9 characters, Client-Email match 5 characters, therefore no need to alert. Whereas if it's the other way around, conditional formatting to highlight the line?
Many thanks in advance!

COUNTIF Partial Match

I am working on a password audit, and one of the tasks I'm trying to solve is counting the number of instances a username is present in the password. For instance, the username might be 'mikeb' and their password is 'mikeb123'.
Searching for a username in a password is simple enough: COUNTIF(A:A, "mikeb")
The problem I'm running into is how to I check A1 against B1, A2 against B2, for the entire column, and add up the number of times that B contained A.
Currently I'm using a workaround where I make the comparison then count the number of true values in a separate column. I'd like to get away from another column if possible.
EDIT: Per request, dummy data:
Username Password Password Contains Username?
Bob BobHasASneakyPa$$word TRUE
Carol No1LikesUCarol TRUE
Admin <>##Admin##<> TRUE
Brian ;Ui6$m8/4??k3&)r7 FALSE
This is what my data looks like right now. I am using COUNTIF(A2, "*" & B2 & "*")>0 for the third column, then doing COUNTIF(C:C, "TRUE") to count up the # of times this happens. Ideally I'd combine these into one equation.
Try using
=SUMPRODUCT(--ISNUMBER(SEARCH(A2:A5,B2:B5)))
I've tested this on your dummy data and searched for the username in the password. It returns an answer of 3 which would be the same as summing your third column.
You could also make this case sensitive if needs be by changing SEARCH to FIND

Best match of a string from a predefined list of values?

I am doing a survey on household appliances, visiting stores. I note down the full model number by hand in a notebook. Back home, I need to fill these in a spreadsheet. I have a partial list of the model numbers. I want to minimise my effort by entering only unique parts of the model number string.
I'm using vlookup with * wildcard in excel for non-exact match. But problem is that it returns the first match, even though a better match is available.
Also, I might miss out on a hyphen or "/" and I need some mechanism to correct for that.
Is there any solution for Excel, Libreoffice/Openoffice or Google Sheets?
Assuming your model numbers are in column A and your search value is in B2, you can use this. It will handle the "/".
=query(A:A,"select A where lower(A) contains '"& lower(B2) &"'")

Resources