A cursory look suggests that
data>filter>autofilter
should do what you need. Record a macro while doing manually. Modify to suit
an input box or range.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Warrick Wilson" <(E-Mail Removed)> wrote in message
news:ugKKHI6%(E-Mail Removed)...
> I'm trying to add a feature to someone's Excel spreadsheet where they can
> print a list of owned items based on a user id. In "real life", I'd be
> looking at a database to do this, but it's a non-profit organization
> staffed by volunteers, so you take what you get as far as technology goes.
>
> In this case, there's a table (range) of Items and a table (range) of
> Users. Each Item has a unique ItemID; each user has a unique UserID. Each
> item has only one associated user; users obviously may have zero or more
> items at any point. And that relationship is tracked by a (ItemID, UserID)
> relationship where the OwnerUserID is a column in the Item data range.
> (hope that's clear enough)
>
> The updating of the user/item relationship isn't a problem (at least, it's
> not my problem). However, what would be "nice" is to have a report/form
> where someone can enter a userid in a cell, and the user information is
> retrieved into an area, and the list of owned items is retrieved into a
> "table-like" area.
>
> I have the user info retrieval working, since it's just a basic one row
> lookup. But the other part - getting all rows where the "OwnerUserID =
> <idEnteredByOperator>" - eludes me. I keep thinking "SELECT * FROM ...
> WHERE OwnerUserID=xx", but I don't know how to express that in Excel.
>
> Is it even possible?
>
> Thanks.
>