Hello,
In the A and B columns of the worksheet, you will see home and away teams of the matches
code will enquire A-B columns and it will define the country of that league game.
Please have a look into file.
Thank you.
Hello,
In the A and B columns of the worksheet, you will see home and away teams of the matches
code will enquire A-B columns and it will define the country of that league game.
Please have a look into file.
Thank you.
Please Login or Register to view this content.
You need to create a lookup table somewhere in the workbook with a list of teams their countries to their right - this could be hidden. Then simply use a VLOOKUP:
=VLOOKUP(A2,lookup_table,2,0)
EDIT: oops! Didn't realise you wanted VBA - sorry!
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
jindon, it is a great code, but i need one more problem.
In long match list, same teams playing with each other in internetional competitions such as uefa champions league. In this case, code need to check tournament column and label the country as "uefa".
Also, some league names same like in different countries Italy and Brazil, name of league is serie A. In this case code need to ask for 2 criteria at the same time and then define the country.
When you will watch the file, you will understand so fast what I am asking for.
In this file, I have added a list for all teams and their country names I have used in the match list.
Complete look up table and stick with the formula.
You stated many things in the workbook, but I just don't understand what you are trying to do, so better stick with the simple formula.
oke jindon.i will try it. thanks a lot once more.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks