Excel 2010: Vlookup Name from one column & Count and return data from another column - excel

Hoping someone can help me here. :)
I have two columns of data in Worksheet 1:
COLUMN A = NAME (EG. TOM)
COLUMN C = TYPE OF QUERY (FAX, TEL, EMAIL, MAIL)
I would like to have in Worksheet 2:
COLUMN A = NAME (EG TOM)
COLUMN B = A COUNT OF HOW MANY FAXES TOM HAS
COLUNN C = A COUNT OF HOW MANY TELEPHONES TOM HAS
COLUMN D - A COUNT OF HOW MANY EMAILS TOM HAS
COLUMN E = A COUNT OF HOW MANY MAILS TOM HAS
If anyone can help me that would be great.
Thanks guys

You can use a pivot table. In sheet 1, click into the data table, then click Insert > Pivot table.
Drag the Name field to the rows. Drag the query type field to the columns.
Drag the Namie field again, this time to the Values area, where it will turn into a count.
Now you see a count of query types for each name in a matrix.

Use countifs instead if you really want to use formula. A pivot table would be the best way to go though.
eg for column B, row 1 on sheet 2:
=COUNTIFS(Sheet1!A:A, A1, Sheet1!C:C, "FAX")

Related

Excel sum different columns if criteria meet

I need help to sum some numbers for specific criteria.
In Status table,under ID WR, when I enter specific number, what I predifined in Vlook table, I get all data what I need, except quantity what I must enter manualy and that is all fine.
My question wuld be: How to sum specific ID WR with quantity for that ID.
Example:
ID WR 8.1 >> how much is total sum for 8.1(not count).
Status table
Vlook table
Edit:
I put excel file(Link).On 3 table in excell i wuld need to sum those ID WR.
Excell table file
Assuming on your Status worksheet, quantity is in column E, and your ID WR in column A. On your lookup worksheet you would use the following formula (assuming A1 is the ID WR that you want to lookup):
=SUMIF(Status!$A$1:$A$20;A1;Status!$E$1:$E$20)
Fix the range and try:
=SUMIF(Status!$A$2:$F$5,Vlook!A3,Status!$F$2:$F$5)

Excel: Index match if date matches month?

I have two excel sheets:
Data:
Column A Column E
01/01/2017 Supplier 1
05/01/2017 Supplier 2
05/01/2017 Supplier 1
Sheet 2:
I am trying to look up the supplier where the month of the date in column A matches the month number in cell F11.
F11 = 1
=IF(ISERROR(INDEX(Data!$A:$I,SMALL(IF(MONTH(Data!A:A)=$F$11,ROW(Data!$A:$A)),ROW(1:1)),5)),"",INDEX(Data!$A:$I,SMALL(IF(MONTH(Data!A:A)=$F$11,ROW(Data!$A:$A)),ROW(1:1)),5))
For some reason this doesn't work and i get no result.
I also need to only list each supplier name the once, unique values. But i believe my formula gives me the same result twice.
Please can someone show me where i am going wrong?
Can't you do this with a pivot table?
Just drag the date field into the columns box, then right-click, choose 'Group' and choose 'months'. Then drag the supplier field underneath it and you should get a list of all unique suppliers by month.
Edit:
Example below.

Excel look up value in array, return next value

I would like to look up a value in a range and return the value in the next row, but can't quite figure out how to do this. I especially would like to do this with formulas rather than VBA, and preferably with built-in formulas than custom (VBA) formulas, due to macro security issues.
I'm using Excel 2010. My workbook has two worksheets, "assessment" and "lookup". In lookup, I have lookup tables.
"lookup" looks something like:
Column A Column B Column C
1 Sales Engineering Manufacturing
2 Alice Bobbie Charlie
3 Dawn Edgar Frank
4 George Holly Isabel
In "assessment," I have some some drop downs from which users select one name from each column in "lookup." Based on some other criteria, I then rank these and create a new, sorted list (using INDEX() and MATCH()) that produce the selected name and corresponding column name a new sort order
Column A Column B
10 Engineering Edgar
11 Sales Alice
What I'd like is to return the name from the next row.
Column C
10 Holly
11 Dawn
But I'm having real trouble figuring out how to get there.
Assuming lookups is located at B2:D5 (change as required) and the result data is at F2:H3 (change as required) enter this formula in cell H2 then copy down.
=INDEX(
INDEX($B$2:$D$5,0,MATCH($F2,$B$2:$D$2,0)),
1+MATCH($G2,
INDEX($B$2:$D$5,0,MATCH($F2,$B$2:$D$2,0)),0))

Excel multiple criteria to retain rows that prioritise during deduplication - VBA macro or other method

I need a solution to this so would any kind people out there that can help a novice Excel user?
I have three columns. Column A contains 10000 email addresses, Column B contains three values (Dr, Prof, Student), Column C contains title of project.
The problem: Same people (judging by email address) appear in this spreadsheet more than once with different value in column B (same person appears as Prof, Dr and Student).
Solution required: create three columns that count how many times same email address (Column A) appears on column A for each of the column b values. So I will then have a count of how many times an email address appears on the spreadsheet per (column b value).
Then deduplicate spreadsheet by Column A and B in a way that prioritises as follows : 1) prof over Dr and Student and 2) dr over student. In this way the rows to be retained will prioritise Professors and doctors over students.
I think it should work if you do the following (please create a backup first):
Search and replace 'Professor'-> '_Professor'
Sort the data by Email and Title (Prof,dr,student). You should now see the groups of duplicate email addresses, where the record to keep is the top one
In a new column (touching the data range) enter True at row 1 (assuming and you don't have headers)
Add a formula to the new column at row 2. (assuming the emails are in column A).
=A1<>A2
Extend the formula down
Copy/ paste the new column to values
Sort the data by the new column
All the rows that have False in the new column can be deleted.

Excel: Match\Index specific column based on multiple criteria

I have two Tables, Table 1 Column A is a rolling date column. Table 2 consists of four columns of differing "Trigger Dates". Table 2, Column 1 contains an Annual trigger, ie occurs once a year. Table 2 Column 2 contains Bi-Annual Triggers, and occurs twice yearly. Table 2 Column 3 contains Monthly Triggers, "12 dates" and Table 2 Column 4 contains Weekly Triggers, "52 dates".
Ok, so what I'm looking for is to a formula that will return the date trigger, where Table 1 Column 1 matches a condition (Annually, Bi-Annually, Monthly, Weekly) selected in a cell "we'll say F1, outside of any ranges that may be created.
Example: If Table 1 Col 2 = "01/02/2013" and I select "Weekly" in F1, the formula will look in the weekly Column in Table 2 to determine if "01/02/2013" exists.
I've allocated a named range to each column in Table 2
I've allocated a named range to the condition in F1 which is a drop down list
Any suggestions?
You might try:
=IFERROR(VLOOKUP(B2,INDIRECT(CHAR(72+MATCH(F$1,$I$1:$L$1,0))&":"&CHAR(72+MATCH(F$1,$I$1:$L$1,0))),1,0),"")
Ok, so supposing your Range Name is in F1, your formula to find the match would look as follows:
=If(IsError(Match(LookupVal,Indirect(F1),0)),"No Match", "Match")
...Something along those lines
Hope this helps point you in the right direction.
INDIRECT and VLOOKUP will be your friends here.
I constructed Table2 just as you had described, with the Annual,Bi-annual,Monthly,Weekly labels for the columns in the table - this will avoid having to keep named ranges up to date, as it's looking directly at the table in the formula
For the function, I then used VLOOKUP to find the date, in the column referenced by F1.
Column Reference: INDIRECT("Table2["&$F$1&"]")
Find Value: VLOOKUP([#Col2],INDIRECT("Table2["&$F$1&"]"),1,FALSE) (looking at column 1 in the return values, as I don't really care what value is returned.
This will return the date if found, and an error if not. I can then wrap the result in the IF(ISERROR( so I can return Yes or No if the date is found.
This produces the entire formula of
=IF(ISERROR(VLOOKUP([#Col2],INDIRECT("Table2["&$F$1&"]"),1,FALSE)),"No","Yes")
for the next column in Table1, so that when I change the value in F1, it will look for that column name in Table2, and let me know if it is found.

Resources