+ Reply to Thread
Results 1 to 8 of 8

Define Country of the league game

  1. #1
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Define Country of the league game

    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.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Define Country of the league game

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,863

    Re: Define Country of the league game

    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.

  4. #4
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: Define Country of the league game

    Quote Originally Posted by jindon View Post
    .
    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.

    Quote Originally Posted by AliGW View Post
    You need to create a lookup table somewhere in the workbook
    In this file, I have added a list for all teams and their country names I have used in the match list.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Define Country of the league game

    Complete look up table and stick with the formula.

  6. #6
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: Define Country of the league game

    Quote Originally Posted by jindon View Post
    Complete look up table and stick with the formula.
    =VLOOKUP(A2,lookup_table,2,0)
    this formula u mean?

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Define Country of the league game

    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.

  8. #8
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: Define Country of the league game

    oke jindon.i will try it. thanks a lot once more.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Getting compile error user-define type not define
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-07-2015, 07:22 AM
  2. keep getting a application define or object define runtime error
    By JRJLHJ1823 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2015, 08:55 PM
  3. Getting error user define type not define
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-26-2013, 10:55 PM
  4. error 1004 application define or object define
    By jay11 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-11-2011, 04:09 AM
  5. Define named range where user can define size
    By nahousto in forum Excel General
    Replies: 4
    Last Post: 07-06-2009, 05:09 PM
  6. Add ‘country name’ column to worksheet from a list of country codes.
    By Ben Morton in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2009, 09:24 AM
  7. Game score without game being played
    By Sheila in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-17-2005, 07:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1