applying categories to bank transactions

stewboz

New Member
Joined
Jun 17, 2009
Messages
1
Windows XP, Excel 2007

Okay, Column A is filled with bank transaction descriptions like:

123456789 ACCOUNT WITHDRAWL
CHECK CARD 1234 GOODY'S CLOTHING
CHECK CARD 5678 APPLEBEES RESTAURANT 123456789876
SOU WAL-MART 092834750298
SOU JCPENNYS STORE 20938209837
... AND SO ON

Column B is the dollar amounts.

I want column C to return a category string for each transaction like, "Clothing", "Fuel", "Food", etc.

Right now I have a formula copied down column C that searches for strings within the current row's transaction description relating to clothing purchases and returns the string "clothing":

=IF(OR(
(ISNUMBER(SEARCH("GOODY*",A:A))),
(ISNUMBER(SEARCH("JCPENNEY",A:A))),
(ISNUMBER(SEARCH("URBAN OUTFITTER",A:A)))),
"Clothing","")

Rather than using the OR function to make a huge list of strings within the formula, I would like to refer to a column of strings elsewhere in the document that I can add to as needed like this:

=IF(
(ISNUMBER(SEARCH("H:H",A:A))),
"Clothing","")

Then I would fill the H column with strings applying to clothing purchases like this:

JCPENNEY*
GOODY*S
URBAN OUTFITTER
MARSHALL
AMERICAN EAGLE
HOLLISTER
...and so on

The ideal result would be for the formula to look at the transaction description in the current row. If it finds any of the strings from column H, then return the string "clothing". If not, then return nothing... or look to column I for another list of strings and return the appropriate category string. i.e. "Food", "Fuel", etc.

Of course this doesn't work because the Search function is asking me for an actual string; not a column of strings. People have suggested VLOOKUP but I can't figure out how to structure the formula to make it work. I did look through the MrExcel FAQ and other users questions. Although everything was very well organized and some questsions were similar to mine I was unable to find a solution to my particular problem. Thanks in advance for any help.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

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