Return a text value that is not equal to a text value with a lookup or array

Allkair

New Member
Joined
Jul 14, 2008
Messages
10
Good Morning,

Here is what I have:

In column B is a employee number, in columns C through R is a bunch of data that is irrelevance to this need, but then in column S is where another formula returns a value of "None", or another value such as "COBC", or a few other possible items. Below all of this data, also in column B is a list of just the unique employee ID numbers.

What I need is formula/array that will go with the unique employee ID list, look at the tables above and pull out a value for that specific employee ID should a value in a column P be something other than "None". If it helps each employee ID could appear in the table up to 3 times and as few as once. Should the formula/array not find anything other than "None" than "None" should be the value that is shown.

Here is a data example:
ABCDEF to RS
1JanEmp1NameNameCityResultsNone
2FebEmp2NameNameCityResultsNone
3MarEmp3NameNameCityResultsNone
4JanEmp1NameNameCityResultsNone
5FebEmp2NameNameCityResultsNone
6MarEmp3NameNameCityResultsOther
7JanEmp1NameNameCityResultsNone
8FebEmp2NameNameCityResultsCOBC
9MarEmp3NameNameCityResultsNone
Emp1Should return "None"
Emp2Should Return "COBC"
Emp3Should Return "Other"

<colgroup><col span="8"></colgroup><tbody>
</tbody>

Any help is appreciated and thank you in advance.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Dim x As Integer, y As Integer, z As Integer
Dim sRange As String

Const cDATA As String = "Data"
Const cWORK As String = "Work"

On Error Resume Next
Sheets(cWORK).Select
On Error Resume Next
ActiveWindow.SelectedSheets.Delete

Sheets.Add After:=ActiveSheet
Sheets(2).Select
Sheets(2).Name = cWORK

x = 2
Do
If Worksheets(cDATA).Cells(x, 1) = "" Then Exit Do
Worksheets(cWORK).Cells(x, 1) = Worksheets(cDATA).Cells(x, 3)
x = x + 1
Loop

sRange = "$A$2:$A$" & Trim(Str(x))
ActiveSheet.Range(sRange).RemoveDuplicates Columns:=1, Header:=xlNo

x = 2
Do
If Worksheets(cWORK).Cells(x, 1) = "" Then Exit Do
y = 2
Do
If Worksheets(cDATA).Cells(y, 3) = "" Then Exit Do
If Worksheets(cDATA).Cells(y, 3) = Worksheets(cWORK).Cells(x, 1) And _
Worksheets(cDATA).Cells(y, 8) <> "None" Then
Worksheets(cWORK).Cells(x, 2) = Worksheets(cDATA).Cells(y, 8)
Exit Do
End If
y = y + 1
Loop
If Worksheets(cWORK).Cells(x, 2) = "" Then Worksheets(cWORK).Cells(x, 2) = "None"
x = x + 1
Loop
 
Upvote 0
this is clumsy but it works

Thanks j8h9x. I am hoping that it can be done with a formula or an array though. I am pretty sure that it is just some sort of Index & Match combination that I have not yet stumbled across.
 
Upvote 0
This appears to be the solution that I was after! Thanks to all the took a look and tried to help.

=IF(SUMPRODUCT(INDEX(($B$2:$B$110=B114)*($S$2:$S$110<>"None"),,))=0,"None",INDEX($S$2:$S$110,MATCH(1,INDEX(($B$2:$B$110=B114)*($S$2:$S$110<>"None"),,),0),1))
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top