Task complete excel function - excel

I have a 2 tables one is the DB and other is the UI; My EmployeeDB table is something like this:
Name: Task 1 Task 2 Task 3
John Smith X X X
Alexandra Kole X X
Jane Austin X
And in my UI table I have employee names in the first column, and I want to show the status of whether all the tasks are completed or not. So it has to be something like this.
Name: Status
John Smith Complete
Alexandra Kole Incomplete
Jane Austin Incomplete
I have this formula that I have pasted to the Status column of this table:
=IF(EmployeeDB[Name]=B4;IF(OR(EmployeeDB[Task 1]=""; EmployeeDB[Task 2]=""; EmployeeDB[Task 3]=""); "Incomplete"; "Complete"); "n.a").
But it only works for the first employee in the status table, for the others, the result is n.a, even though the employee is on the DB.
Could you please state what is the problem, and how it can be fixed?

Try,
=IF(COUNTA(INDEX(DB[[Task 1]:[Task 3]], MATCH([#[Name:]], DB[Name:], 0), 0))=3, "Complete", "Incomplete")

You already have a nice solution given which avoids volatile Indirect. Here is with indirect
H2 drag down
=IF(NOT(COUNTBLANK(OFFSET(INDIRECT(CELL("ADDRESS",INDEX(A2,MATCH($G2,$A2:$A4,0)))),,1,1,3))),"COMPLETE","INCOMPLETE")
Data

This will work:
Under presumption your data starts at B2 and ends at let's say D2,
like so:
Then the following formula will work.
=IF(COUNTA(B2:D2) = COLUMNS(B2:D2), "Complete", "Incomplete")
This solution is however very simplified, if you want to match the names to specific index, you should use the solution #QHarr provided. This should only illustrate an easy workaround.

Related

Case sensitive problem in Excel’s pivot table

Example below, the ID of people are case sensitive (if don’t consider the case, some of them are of the same, for example, David’s and Mike’s, Lilly’s and John’s).
When putting them into a pivot table, it displays the same IDs for different people, i.e. David’s = Mike’s, Lilly’s = John’s.
Is there a way to have the pivot table to display actual IDs (case sensitive)?
ID Name
Txze David
TxZe Mike
TwgQ Lucy
3RqM Lilly
3RQm John
TvrE Kate
So, had a quick go with index() and match() as suggested in my comment:
INDEX(A$2:A$7,MATCH(D2,$B$2:$B$7,0))
D2 and D4 contain the Name looked for and the results are in F2 & F4, which give the different results. Note, 0 is used for an exact match in the match function.

Excel formula: search in column by another value (LIKE)

I'm having a problem in Excel, where I'm trying to search an entire column for a name (not necessarily 100% identical) that is in another column.
The following table for a better explanation:
---------------------------------------
NAME CITY FATHER NAME
---------------------------------------
Saad Test New York William Jack
Jack Jacking Paris Noah Saad
Adam King Rabat William Sara
Sara Best Madrid Benjamin Adam
Briefly: I want to get the father's name by using only the name column. Is there a way to do that? (The order of the fathers’ names is incorrect, so I want to search using the name, if it is present in the father’s name, then it is the result I want)
Example: Saad test his father's name is Noah Saad (Match by Saad)
PS: I tried using LOOKUP, VLOOKUP and MATCH, but unfortunately the result is always N/A
PS 2: The data I have in Arabic is the reason why the above functions are not working?
I would use index() with match(), assuming your data starts in cell A1, like so:
=index(C1:C4,match(F1,A1:A4,0))
F1 contains the name that you look for.
Note, the classic problem is that there are extra spaces (leading or trailing) that make the names not identical.
You can trap errors as so:
=iferror(index(C1:C4,match(F1,A1:A4,0)),"Check")
You could do:
=INDEX( $C$2:$C$5, MATCH( "*" & MID( A2, 1, FIND( " ", A2 )-1), $C$2:$C$5,0) )
SolarMike - I think you have said the same, so I'm sorry if I am
stepping on your answer.

Find the position of a related string in a list

In my worksheet, B2:F2 and B8:D8 are already filled in.
I would like to find the formulas for B9:D9. For instance, B9 is 2 because we can find Lee in Lee XXXX and Lee is at the second place of B2:F2. C9 is 4 because we can find Jim in Jim XXXX and Jim is at the second place of B2:F2.
To check the relation of Lee and Lee XXXX (Jim and Jim XXXX), we could use SEARCH, left_substring (if such a function exists).
Both single formulas or array formula will be fine. Using LAMBDA function is secondary choice, because it is still in preview.
Could anyone help?
If what is needed is always the first "word":
=MATCH(LEFT(B8,FIND(" ",B8)-1),$B$2:$F$2,0)
If you want to search on any position in the string:
=AGGREGATE(15,7,(COLUMN($B$2:$F$2)-MIN(COLUMN($B$2:$F$2))+1)/(ISNUMBER(SEARCH(" "&$B$2:$F$2&" "," "&B8&" "))),1)
With FILTER instead of AGGREGATE:
=#FILTER((COLUMN($B$2:$F$2)-MIN(COLUMN($B$2:$F$2))+1),ISNUMBER(SEARCH(" "&$B$2:$F$2&" "," "&B8&" ")),"")

VLOOKUP MULTIPLE RANGES

Column A and B is a item and country post code. Column B contain two country post code USA and UK. Both country we have dispatched same part. I am trying to create vlookup formula corresponding to the range but its return na. Please help me.
Country code ranges;
USA Angeles10 Angeles20 Angeles30 Angeles40 Angeles50 Angeles60 Angeles70 Angeles80 Angeles90 Angeles100 Angeles110 Angeles120 Angeles130 Angeles140 Angeles150
UK London10 London20 London30 London40 London50 London60 London70 London80 London90 London100 London110 London120 London130 London140 London150
DATA
ITEM POST CODE
4 Angeles10
4 Angeles20
110489 Angeles30
110489 Angeles40
113388 Angeles50
113388 Angeles60
113636 Angeles70
113636 Angeles80
11363613001 Angeles90
11363613001 Angeles100
11363613002 Angeles110
11363613002 Angeles120
11363613003 Angeles130
11363613003 Angeles140
1136362001 Angeles150
4 London10
4 London20
110489 London30
110489 London40
113388 London50
113388 London60
113636 London70
113636 London80
11363613001 London90
11363613001 London100
11363613002 London110
11363613002 London120
11363613003 London130
11363613003 London140
1136362001 London150
DESIRED RESULT
ITEM USA UK
4 Los Angeles10 London10
I put the first data on a sheet named datasheet in starting in A1.
Then use a formula like so in the E3:
=INDEX($B:$B,AGGREGATE(15,6,ROW($B$2:$B$31)/((ISNUMBER(MATCH($B$2:$B$31,INDEX(datasheet!$1:$1048576,MATCH(E$2,datasheet!$A:$A,0),0),0)))*($A$2:$A$31=$D3)),1))
Then copy/drag over and down.
Easiset Answer
If your data isn't changing and you know exactly where Angeles stops and London starts, you can just use a standard VLOOKUP formula. You just give the bottom part of the table to the UK column.
E3: =VLOOKUP(D3,A$3:B$6,2,)
F3: =VLOOKUP(D3,A$7:B$10,2,)
A little more complicated
If you need to be able to add rows or locations, this solution will work better. Add helper columns for each of the locations you need and a helper column which combines the item ID with the location. You can then use VLOOKUP by searching for the combination of item ID and location.
B3: =A3&CONCAT(D3:E3) (can expand past E3 for extra locations)
D3: =IF(ISERR(SEARCH(D$2,$C3)),"",D$2)
E3: =IF(ISERR(SEARCH(E$2,$C3)),"",E$2) (can drag right for each extra location)
H3: =VLOOKUP($G3&H$2,$B$3:$C$10,2,)
I3: =VLOOKUP($G3&I$2,$B$3:$C$10,2,) (can drag right for each extra location)
My favorite Answer
Just use Scott Craner's approach! ☺

Need a formula for adding the data from sheet 1 to sheet 2

I need a formula in sheet 2 to get the data from Sheet 1.
Eg:
Sheet 1:A
Level A
Level B
Level A
Sheet1:B
1/1/2015
1/1/2015
1/1/2015
Sheet1:C
31/1/2015
31/1/2015
31/1/2015
Now, I need a formula in Sheet 2:A, that if Sheet1: Level A is there then it will take 1/1/2015 and if Level B is their then 31/1/2015.
Please let me know if any extra details you need.
try this:
= IF(Plan1!A1="Level A"; Plan1!B1; IF(Plan1!A1="Level B";Plan1!C1;"-"))
Notice that if any, the value will be -.
Basically, it sounds as though you need something like this
=IF(Sheet1!A1="Level A",Sheet1!B1,Sheet1!C1)
This will then return the above date requirement, but will take into account any changes you make to the first page.
For the below comment, please try.
=IF(OR(Sheet1!A1={"Level A";"Level D"}), Sheet1!B1, Sheet1!C1)

Resources