Using Index function without exact matches - list

I don't know the easiest way to get this done. I have 1 list of account names given to me, and a list of over 15,000 account names with corresponding sales rep names from our system. I need to know if the accounts on my list have assigned sales reps and who they are.
The way I have it set up is
Column A: System List
Column B: Corresponding sales rep
Column C: My account list
Column D: =INDEX(B:B,MATCH(C2,A:A,0))
This produces some correct results but some of the account names aren't exact which causes a problem. For example
Column A: American Services Inc
Column C: American Services
Column D: #N/A
I'm stuck on what to do now.

For the specific example presented you can do this wildcard match:
=INDEX(B:B,MATCH(C2&"*",A:A,0))
But depending on how "different" the entries in your lists are that should match, you may need an heuristics fuzzy-match add-in.

Related

Using Excel to return a yes/no response from a data table, using multiple conditions in separate columns

I'm trying to refine a report dashboard utilized at my workplace. The process that I'm trying to automate is;
Data is generated into a worksheet via a query table (Worksheet called Imported Data)
From that table, i'm wanting to look at 3 separate columns for 3 conditions
Those conditions are a) Team, B) Frequency, C) Month and D) Yes (from a ye/no option)
Providing all those conditions are met Eg, Team A, Monthly, February, Yes, I want Excel to produce a response of Compliant, otherwise say Non-compliant, onto another worksheet called Governance Complaince
The response for this is on a separate work sheet.
The main query table that is generated has around 8 Team choices, 6 Frequency options, with 12 month and then the 2 (obviously) yes/no options.
I've tried a few different formulas to get this to work, but I only ever get the True value from the formula.
I Feel that maybe the formula is stopping once it sees the first Team A selection (Which by nature of how the query table is generated, is the first result in the Team column) and then ignoring the remainder of the formula, despite my best attempts.
The current formula I'm using is
=IF(COUNTIFS('Imported Data'!A:A,"Team A")+COUNTIFS('Imported Data'!C:C,"Monthly")+COUNTIFS('Imported Data'!F:F,"February")+COUNTIFS('Imported Data'!I:I,"Yes")>1,"Compliant","Non-compliant")
I've tried
=IF(COUNTIFS('Imported Data'!A:A,"Team A")+COUNTIFS('Imported Data'!C:C,"Monthly")+COUNTIFS('Imported Data'!F:F,"February")+COUNTIFS('Imported Data'!I:I,"Yes")=ROWS('Imported Data'!A1:Z500),"Compliant","Non-compliant")
=IF(AND('Imported Data'!A:A,"Team A")+AND('Imported Data'!C:C,"Monthly")+AND('Imported Data'!F:F,"February")+AND('Imported Data'!I:I,"Yes"),"Compliant","Non-compliant")
=IF(AND('Imported Data'!A:A,"Team A")+AND('Imported Data'!C:C,"Monthly")+AND('Imported Data'!F:F,"February")+AND('Imported Data'!I:I,"Yes")=ROWS('Imported Data'!A1:Z500),"Compliant","Non-compliant")
All I get is a #Value error, or only the Compliant value, despite any changes made to the data the formula references.
All the cells are text, there is no numerical data in the tables. The formula is placed into a cell in another worksheet called Governance Compliance
Essentially I want the formula to be able to look at the query table data, output the Ture/False value into a monthly tracker (This formula will be replicated over about 26 different audits for 8 teams) automatically, cutting down on manual processing. I've been able to get the date to then look at a quarterly array of teams and return a complaint/non-complaint result into another worksheet fine using
=IF(COUNTIF('Governance Compliance'!E11:G19,"Compliant")=ROWS('Governance Compliance'!E11:G19),"Yes","No")
And I thought that my 3 condition if statement to get the compliant result into the Governance Compliance worksheet would just be an expansion of conditions on this formula, but I am clearly wrong.
The query table is sorted alphabetically by Team if that makes a difference.

If Field is Empty in Salesforce

I have a report in Salesforce where I would need to use an "if"-logic, but I don't know if it's possible.
I have two columns. Column A (object1) and column B (object2)
Column A is sometimes empty, but column B always has a value/text.
I want to apply an if-logic that says "If column A is empty, show text of column B/object 2 in that case".
Is it possible to do this?
At the end I should see a report where column A is never empty.
I appreciate any help I can get.
Read up about BLANKVALUE function. You can use it in a normal formula field (if there's clear relation between A and B) or in a report's row-level formula.
This is a terrible idea for any real application - but here's providing Account's City if Contact's City is blank.

Power BI Combining Columns and use lookup

I have two reports: first report has a column with sponsor names (name: Sponsor) and the other report also has sponsor names but written differently (name: Companies). Example:
**Sponsor**
Apple
Target
Amazon
IBM
Samsung
**Sponsor (Other)**
Apple Inc
Target LLC
Amazon Marketplace
IBM Computers
Samsung Company
I have appended these two columns so that they are in the same report called Sponsor_All, column names the same as above. What I would like is to create a new column where it would pull in the names from the sponsor column and change the name of the Sponsor (Other) column based on a lookup table so that all of the names are labeled like the sponsor column. Hope thats makes sense.
It looks like what you need is conditional column of some sort.
First thing I would recommend, when you append the two tables, if column names are the same it will append values from both tables into one column, instead of having two columns with different name and a bunch of null values. After that you can either add Conditional Column and hard code the values (so it will be something like: if Sponsor starts with 'Apple' then 'Apple' etc.).
This is not the best approach though, cause you will have to maintain these conditions manually. Better if there's some sort of pattern that you can notice, e.g. in your example I see that to get from Sponsor (other) to Sponsor you just need to extract the first word. If this is the pattern you always have you can use Custom Column and use formula to extract only the first word.
Lastly, if you already have some sort of lookup table you can merge it (after appending together Sponsors and Sponsors(Other) into one column) and use fuzzy lookup option. In all honesty though I never used it and not sure how good it is. If it gives you good enough result you can "clean it up" in next step with custom or conditional column.

Find most frequent occurrence with condition on Google Sheets

I have a list of countries and company types (A, B, C and D) in a Google Sheet. For each country, there are multiple entries, one entry per company. Countries are in column A of the spreadsheet, the type of the companies is in column B.
I would like to find out, for each country, what is the most common type of company. In other words, I would like to know, for each country, what is the letter in column B, that appears the most.
I have managed to find out what is the letter that appears the most in the entire list of countries. To do that, I have used this formula in cell D2:
=ARRAYFORMULA(INDEX(B1:B,MATCH(MAX(COUNTIF(B1:B,B1:B)),COUNTIF(B1:B,B1:B),0)))
It gives me the most common letter overall. However, I am not sure how to include a condition in the formula that will give me the answer considering one particular country only.
I have created a sample sheet, which you can find here. I have created a table on D1:E16 in which I would like to have the formula.
Thank you.
This should do it:
=ARRAYFORMULA(INDEX($B$1:$B,MATCH(MAX(COUNTIFS($B$1:$B,$B$1:$B,$A$1:$A,D2)),COUNTIFS($B$1:$B,$B$1:$B,$A$1:$A,D2),0)))

Conditional/cascading/dependent drop-down list

I am essentially trying to do that this guy is trying to do:
Excel drop-down list using vLookup
I've gone through the steps and since my data set has about 400 different drop down options I am hoping there is an easier way than naming ranges. I have a list of about 400 different account names. Each of these account names is tied to a household and identified by the household ID number. A household can have anywhere from 1-5 account names. I would like for my drop down menu to be able to identify a household ID number and then provide the drop down with the account names associated with it.
Example:
Where household Id number is the identifier.
I've gone here as well http://sites.madrocketscientist.com/jerrybeaucaires-excelassistant/data-validation/dynamic-indirect and am trying to find a way to save on some of the manual work.I am a total newbie so thank you in advance for any help you can provide.
Let's pretend you have three worksheets. The first worksheet, Sheet1, is the sheet that your users will be looking at and it has the drop down lists. We'll say that the cell containing the first drop down option is in B1 (the one with about 400 different options) and the cell containing the dependent drop down is in B2:
On your second sheet, which we'll call MasterList, is all of the data options and the corresponding data. Row 1 is a header row; Row 2 and down is the actual data:
On your third sheet, which we'll call DropDownLists, is where the magic happens. It first needs to have a list of all the unique data options. I've put that in column A. You can get the unique data options from your master list through whatever means you prefer (Advanced Filter, Pivot Table, formula, VBA, etc). That list of unique data options is the basis of your drop down list for Sheet1 cell B1. Then in cell B2 of DropDownLists and copied down as far as needed to guarantee it will grab all data associated with the selected Data Option, use this formula (adjust sheet names and ranges to suit your actual data):
=IF(OR(Sheet1!$B$1="",ROW(B1)>COUNTIF(MasterList!$A$2:$A$10000,Sheet1!$B$1)),"",INDEX(MasterList!$B$2:$B$10000,MATCH(1,INDEX((MasterList!$A$2:$A$10000=Sheet1!$B$1)*(COUNTIF(B$1:B1,MasterList!$B$2:$B$10000)=0),),0)))
This makes your DropDownLists sheet look like this:
Lastly, we need to make that list (data based on the selected Data Option) a dynamic named range. I named it listFilteredData and defined it with this formula:
=DropDownLists!$B$2:INDEX(DropDownLists!$B:$B,MAX(2,ROWS(DropDownLists!$B:$B)-COUNTBLANK(DropDownLists!$B:$B)))
Then for Sheet1 cell B2, use Data Validation and define the list with =listFilteredData and you will get results as shown in my example.
Practice with this.....it will get what you need.
Your data will have to sorted for this to work.
Sorted Data
Data Validation for Shows
Data Validation for Episodes
This formula in the data validation box
=OFFSET($A$1,MATCH($E$4,$A:$A,0)-1,1,COUNTIF($A:$A,$E$4),1)
Enter the array formula to find the Duration
Must be confirmed with Ctrl & Shift & Enter
=INDEX($C$4:$C$18,MATCH(1,(E4=$A$4:$A$18)*(F4=$B$4:$B$18),0))