0

I have 2 columns. The first one will be a BSB number and the second will be the name of the bank. How can I create a formula or Macro where the first 2 or 3 digits in column 1 will determine the name of the bank in column 2. For example, If I enter 063215 in column 1, then column 2 would show 'Commonwealth' or if I enter 114879 it would return a result of 'St George', just from the first 2 or 3 digits. I'm pretty new to VBA and macro's in Excel, so please be kind. Any help would be much appreciated.

New contributor
Brett is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0

If you have your search box in a different cell on the form, the following formula should work. Such as the 3-digit number is in column A, the bank in column B, the search cell is C2, and the return cell is D2.

=IFERROR(VLOOKUP(LEFT($C$2,3),A:B,2),"")

Your Answer

Brett is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.