Attached a new sample spreadsheet with examples, Stop removing sample fake data spreadsheet. Please read.
ALL DATA IS FAKE from an online data generator. The Cities and Provinces are real, from the Government of Canada, the branches are from TD Bank and are public to add authenticity for testing purposes, all DATA IS NOT REAL, IT IS FAKE.
CREDIT CARD NUMBERS FAKE, CVV FAKE. Hopefully people will read before removing sample fake data worksheet.
NAMES AND ADDRESSES GENERATED FROM A FAKE GENERATOR, REMOVED OUT OF SAMPLE AS NOT NEEDED. PM me as I created a code that combines First and Last Name, has modifiers between including "-", "_" and "." as well as 12 different numbers, and 13 different email service providers. Unable to post here as I am too new and it keeps giving me an error in my submission.
It is the Routing Number and Transit number I am looking for in the Transactions Worksheet.
STATING IT AGAIN, ALL DATA IS FAKE
Excel spreadsheet with over 50,000 rows, two worksheets, first one is called Transactions, second is called Branches
I am trying to find the routing number and transit number where the Province and City match, however:
IF the Province matches and the City is not found, a random city chosen, if there are multiple branches in that city, then a random branch is pulled.
IF the Province and the City match, a random branch is chosen if there is more than 1 branch in the city.
Named Ranges: each Province has a named Range in Branches: BRITISHCOLUMBIA,ALBERTA,SASKATCHEWAN
Column Routing/Transit Number is blank in the Transactions worksheet, a random Branch would come from the Branches worksheet
A random Branch would be generated from the Province of British Columbia and the City matching Vancouver, this City has 81 Branches, so let's say randomly it pulls the branch located at Coal Harbour, 494400-94400 would be pulled into the column*Routing/Transit Number in the Transactions Worksheet.
I tried, #REF error, so I know I have it wrong. Tried VLOOKUP, but want to be able to choose a RANDOM branch if the City has more than one/
*=INDEX(INDIRECT(VLOOKUP(G2,ALLPROVINCES,'Branches'!$D$2:$F$2526,4,FALSE)),RANDBETWEEN(1,COUNTA(INDIRECT(VLOOKUP(D2,ALLPROVINCES$D$2:$D$2526,2,FALSE)))))
Bookmarks