View Single Post
  #5   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Joe,

The "Jane's Grocery #473" problem:

Switch your columns in your lookup table so that Transaction comes first, and sort ascending on the
Transaction Column. Let's say that your example table is in A1:B4 .

Then, with Jane's Grocery #473 in cell E7, use the formula

=VLOOKUP(E7,$A$1:$B$4,2)

The key is sorting based on the first column, and leaving out the fourth argument of the VLOOKUP
function (or set it to True, the default value).

The "Allentown Mobil" Problem:

You will need to put that as a separate entry into your category lookup table.

HTH,
Bernie
MS Excel MVP


"six50joe" wrote in message
ups.com...
I've encountered one problem trying to use VLOOKUP-

My category lookup table looks something like this:

Category Transaction
Food Jane's Grocery
Gas Mobil
Food Joe's Supermarket

My transaction list has items like this:
Jane's Grocery #473 $16
Allentown Mobil $18
etc.

-so the problem is that values in the lookup table are a substring of
the transaction description, not the other way around. Is there a
simple way to reverse the way the lookup works?

If not, a method to solve this problem would be excecuting a
search/replace whereby every item (substring) in the lookup table
replaces the cell value every item in the transaction list where it is
a substring, but I'm not sure how I could automate this to do so for
every item in the lookup table, and I understand that the order of
items in the lookup table impacts this method.

Any further advice is much appreciated.

Thanks,
Joe