VBA to search bank feed for multiple strings and use that resulting match to "Vlookup" account from table on another worksheet.

JS2207

New Member
Joined
Nov 23, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,

The image "Output" shows the results of my pasting a bank feed export into a spreadsheet that splits the activity by type (withdrawal, deposit, check) and populates the transactions in alphabetical order by the memo into tables for each transaction type. I think the answer to my question would apply to all transaction types, so please assume I am talking about withdrawals going forward.

Based upon the withdrawal memo (In this case, "W2" of output), I select the necessary vendor, payee, etc. (Cell "T2") from a validated list. This populates "U2" with the correct account (expense, liability, etc.) via a Vlookup to a different table on a different worksheet (table of only vendors in column 1 and accounts in column 2).

I would like to use VBA to search each memo ("F9" of the "Bank Feed" image) for a list of strings (in the example - "Pizza Hut", "Exxon", or "Express Delivery") and return the vendor name in "T2" and the account in "U2" (of the "Output" worksheet).

Once it identifies a match and places that text in column T, I would like it to move to the next memo ("F10" of "Bank Feed") and continue until it reaches the string (full, not partial) "Total" in column A of the "Bank Feed" worksheet (the end of the table).

Is this possible?

Any personal information has been changed (which is why the memos aren't in alphabetical order as previously stated).

Thanks so much in advance.
 

Attachments

  • Bank Feed.jpg
    Bank Feed.jpg
    73.4 KB · Views: 27
  • Output.jpg
    Output.jpg
    34.8 KB · Views: 30

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hey - in case you didn't find your answer elsewhere, look at my posts titled "Yet another cut and paste scenario". There are a few pieces you can modify for your scenario and my scenario was also using bank (cashpro) feed
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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