Help!

Partial match lookup question

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Worksheet Functions RSS
Next:  headers in worksheet  
Author Message
drink.the.koolaid
External


Since: Nov 12, 2006
Posts: 2



PostPosted: Sun Nov 12, 2006 11:57 am    Post subject: Partial match lookup question
Archived from groups: microsoft>public>excel>worksheet>functions (more info?)

Hello excel gurus. I've got a spreadsheet of my bank transactions. If
the transaction description contains a keyword from another list, I'd
like to assign it a category from the next column over.

For example:

Sheet1 has transaction descriptions like:

POS DB WAL-MART # 9100 08/09 1030 HUNTERS CO
THE OLIVE GARD KNOXVILLE TN
POS DB TARGET T20 9100 08/04 4700 NEW HARVES


Sheet2 has a list of keywords and categories like:

WAL-MART Entertainment - Toys
TARGET Entertainment - Toys
OLIVE GARD Food - Dinner


I was using vlookup but there are problems because many vendors include
the transaction date in the description like the walmart and target
items above.

Any suggestions?
Back to top
Dave Peterson
External


Since: Jul 08, 2005
Posts: 16049



PostPosted: Sun Nov 12, 2006 2:24 pm    Post subject: Re: Partial match lookup question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

=INDEX(Sheet2!$B$1:$B$10,
MIN(IF(ISNUMBER(MATCH("*"&Sheet2!$A$1:$A$10&"*",A1,0)),
ROW(Sheet2!$A$1:$A$10))))

(all in one cell)

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.


drink.the.koolaid.DeleteThis@gmail.com wrote:
>
> Hello excel gurus. I've got a spreadsheet of my bank transactions. If
> the transaction description contains a keyword from another list, I'd
> like to assign it a category from the next column over.
>
> For example:
>
> Sheet1 has transaction descriptions like:
>
> POS DB WAL-MART # 9100 08/09 1030 HUNTERS CO
> THE OLIVE GARD KNOXVILLE TN
> POS DB TARGET T20 9100 08/04 4700 NEW HARVES
>
> Sheet2 has a list of keywords and categories like:
>
> WAL-MART Entertainment - Toys
> TARGET Entertainment - Toys
> OLIVE GARD Food - Dinner
>
> I was using vlookup but there are problems because many vendors include
> the transaction date in the description like the walmart and target
> items above.
>
> Any suggestions?

--

Dave Peterson
Back to top
Lori
External


Since: Sep 26, 2006
Posts: 253



PostPosted: Sun Nov 12, 2006 3:11 pm    Post subject: Re: Partial match lookup question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

=LOOKUP(99,SEARCH(Sheet2!$A$1:$A$10,A1),Sheet2!$B$1:$B$10)

(Note: if there's more than one matching category this gives the last
match.)

drink.the.koolaid DeleteThis @gmail.com wrote:

> Hello excel gurus. I've got a spreadsheet of my bank transactions. If
> the transaction description contains a keyword from another list, I'd
> like to assign it a category from the next column over.
>
> For example:
>
> Sheet1 has transaction descriptions like:
>
> POS DB WAL-MART # 9100 08/09 1030 HUNTERS CO
> THE OLIVE GARD KNOXVILLE TN
> POS DB TARGET T20 9100 08/04 4700 NEW HARVES
>
>
> Sheet2 has a list of keywords and categories like:
>
> WAL-MART Entertainment - Toys
> TARGET Entertainment - Toys
> OLIVE GARD Food - Dinner
>
>
> I was using vlookup but there are problems because many vendors include
> the transaction date in the description like the walmart and target
> items above.
>
> Any suggestions?
Back to top
Ron Coderre
External


Since: May 10, 2006
Posts: 971



PostPosted: Sun Nov 12, 2006 5:15 pm    Post subject: Re: Partial match lookup question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Maybe this?:

With
The list on Sheet2, beginning in cell A1
* no match
wal-mart Entertainment - Toys
target Entertainment - Toys
olive gard Food - Dinner

Note: I added the asterisk item (*) at the TOP of the list.

Then....on Sheet1
A1: POS DB WAL-MART # 9100 08/09 1030 HUNTERS CO

B1:
=LOOKUP(10^99,MATCH("*"&Sheet2!$A$1:$A$10&"*",A1,0)/(Sheet2!$A$1:$A$10<>""),Sheet2!$B$1:$B$10)

Note: That formula is durable against unmatched items (e.g. new accounts).
It returns "no match" in those instances.

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Lori" wrote:

> =LOOKUP(99,SEARCH(Sheet2!$A$1:$A$10,A1),Sheet2!$B$1:$B$10)
>
> (Note: if there's more than one matching category this gives the last
> match.)
>
> drink.the.koolaid.TakeThisOut@gmail.com wrote:
>
> > Hello excel gurus. I've got a spreadsheet of my bank transactions. If
> > the transaction description contains a keyword from another list, I'd
> > like to assign it a category from the next column over.
> >
> > For example:
> >
> > Sheet1 has transaction descriptions like:
> >
> > POS DB WAL-MART # 9100 08/09 1030 HUNTERS CO
> > THE OLIVE GARD KNOXVILLE TN
> > POS DB TARGET T20 9100 08/04 4700 NEW HARVES
> >
> >
> > Sheet2 has a list of keywords and categories like:
> >
> > WAL-MART Entertainment - Toys
> > TARGET Entertainment - Toys
> > OLIVE GARD Food - Dinner
> >
> >
> > I was using vlookup but there are problems because many vendors include
> > the transaction date in the description like the walmart and target
> > items above.
> >
> > Any suggestions?
>
>
Back to top
Ron Coderre
External


Since: Nov 12, 2006
Posts: 21



PostPosted: Sun Nov 12, 2006 8:52 pm    Post subject: Re: Partial match lookup question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

My apologies, Lori....I intended to respond to the OP, not your post.

Regards,
Ron

"Ron Coderre" <ronREMOVETHIScoderre.RemoveThis@bigfoot.com> wrote in message
news:B07ED6E4-3E26-448B-9428-AD463142E6AD@microsoft.com...
> Maybe this?:
>
> With
> The list on Sheet2, beginning in cell A1
> * no match
> wal-mart Entertainment - Toys
> target Entertainment - Toys
> olive gard Food - Dinner
>
> Note: I added the asterisk item (*) at the TOP of the list.
>
> Then....on Sheet1
> A1: POS DB WAL-MART # 9100 08/09 1030 HUNTERS CO
>
> B1:
> =LOOKUP(10^99,MATCH("*"&Sheet2!$A$1:$A$10&"*",A1,0)/(Sheet2!$A$1:$A$10<>""),Sheet2!$B$1:$B$10)
>
> Note: That formula is durable against unmatched items (e.g. new accounts).
> It returns "no match" in those instances.
>
> Is that something you can work with?
> ***********
> Regards,
> Ron
>
> XL2002, WinXP
>
>
> "Lori" wrote:
>
>> =LOOKUP(99,SEARCH(Sheet2!$A$1:$A$10,A1),Sheet2!$B$1:$B$10)
>>
>> (Note: if there's more than one matching category this gives the last
>> match.)
>>
>> drink.the.koolaid.RemoveThis@gmail.com wrote:
>>
>> > Hello excel gurus. I've got a spreadsheet of my bank transactions. If
>> > the transaction description contains a keyword from another list, I'd
>> > like to assign it a category from the next column over.
>> >
>> > For example:
>> >
>> > Sheet1 has transaction descriptions like:
>> >
>> > POS DB WAL-MART # 9100 08/09 1030 HUNTERS CO
>> > THE OLIVE GARD KNOXVILLE TN
>> > POS DB TARGET T20 9100 08/04 4700 NEW HARVES
>> >
>> >
>> > Sheet2 has a list of keywords and categories like:
>> >
>> > WAL-MART Entertainment - Toys
>> > TARGET Entertainment - Toys
>> > OLIVE GARD Food - Dinner
>> >
>> >
>> > I was using vlookup but there are problems because many vendors include
>> > the transaction date in the description like the walmart and target
>> > items above.
>> >
>> > Any suggestions?
>>
>>
Back to top
drink.the.koolaid
External


Since: Nov 12, 2006
Posts: 2



PostPosted: Thu Nov 16, 2006 12:03 am    Post subject: Re: Partial match lookup question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

=LOOKUP(10^99,MATCH("*"&Sheet2!$A$1:$A$10&"*",A1,0)/(Sheet2!$A$1:$A$10<>""),Sheet2!$B$1:$B$10)


Perfect! Thank you so much... Would you mind explaining how it
works? I understand the MATCH part, but what's the division for?
Back to top
Baogab



Joined: Dec 08, 2007
Posts: 1



PostPosted: Sat Dec 08, 2007 10:16 am    Post subject: [Login to view extended thread Info.]

Hi,

I'm trying the formula in Excel 2003 and it does'nt work.

=LOOKUP(10^99,MATCH("*"&Sheet2!$A$1:$A$10&"*",A1,0)/(Sheet2!$A$1:$A$10<>""),Sheet2!$B$1:$B$10)

Here's the excel message: "The formula you typed contains an error"

I don't undestand, it's the same.

Could you help me ?
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Worksheet Functions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum