Lookup a name in a range of values??

bggauth

New Member
Joined
Dec 10, 2007
Messages
10
Hello,

This is a bit complicated for me.

I want to be able to do a search in Excel (click a button and enter a name) that will bring back a persons name that is associated with all tasks.

So the tasks are in column A.
User names are in Coumns B - J.
Let's say there are 100 tasks.
I need a formula that will do the following:
Bring back the number of times the person's name is listed or how many tasks he/she is assigned to.
Possibly also bring back the tasks he/she is assigned to.

Thansk for any ideas.

Barry
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi bggauth,

I am not confident with VBA but you might try something like:

Code:
Dim strToFind As String
Dim strMsg As String
Dim r As Range
strToFind = InputBox("Enter text to find")
For Each r In Intersect(Range("$B:$B"), ActiveSheet.UsedRange)
    If Not r.Resize(, 9).Find(strToFind, , , xlWhole, xlByRows) Is Nothing Then

        strMsg = strMsg & vbCrLf & strToFind & vbTab & Range("A" & r.Row).Value
    End If
Next r
MsgBox "Search item:" & vbTab & "Project:" & vbCrLf & strMsg

Note that when I tried using named arguments for the Find method (LookAt:=xlWhole,SearchOrder:=xlByRows) I got a Run Time Error 9: Subscript Out Of Range (therefore the commas for the missing arguments). Don't know why. Does anyone?

Kind regards,
JohnM
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,502
Messages
6,179,126
Members
452,890
Latest member
Nikhil Ramesh

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