+ Reply to Thread
Results 1 to 6 of 6

Copy cell from 1 sheet to another sheet depending on what info is displayed in a cell

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-24-2013
    Location
    Huddersfield, England
    MS-Off Ver
    2013
    Posts
    104

    Copy cell from 1 sheet to another sheet depending on what info is displayed in a cell

    Hi Guys

    It is probably a very basic request for most but i'm not exactly brilliant with excel so it's stumped me. Hope someone can help.

    I use excel to keep track of football stats, in particular goal expectancies but it can be hard going inputting all the data from all the various leagues around the world. To make it easier I want to be able to type in the 2 teams playing and all the other cells in my game matchup sheet to change as per the two teams. I have managed this with all but 4 cells. Which is where I need the help. Is it possible to have a cell return the value from a particular cell on another sheet depending on what I have inputted in a particular cell on the current sheet?

    To explain, on 1 sheet I have the list of teams of a particular league from say cell A5 - A28 and then in subsequent columns I have relevant info such as goals scored home and away & conceded home and away etc. On another sheet I have the facility to input 2 teams playing each other and see how their stats match up. There are 4 cells on this sheet that I want to return values from sheet 1 depending on the 2 teams inputted. So say i inputted a team from cell A17 i want to return the value from cell L17 and if the team they were playing were from cell A5 i want to return the value from L5 in another cell.

    Probably very long winded and littered with inconsistencies but if anyone can understand what I mean and can help please let me know, I'd appreciate it cos it's driving my mad

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Copy cell from 1 sheet to another sheet depending on what info is displayed in a cell

    Suppose you put your first team in A2 of Sheet2, then you can use this formula in B2:

    =VLOOKUP(A2,Sheet1!$A$5:$L$28,12,0)

    and if your second team is in C2, use this in D2:

    =VLOOKUP(C2,Sheet1!$A$5:$L$28,12,0)

    (which means that you can just copy/paste the first formula into D2).

    Then you can just copy these formulae down if you want to enter other teams in column A and C.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    11-24-2013
    Location
    Huddersfield, England
    MS-Off Ver
    2013
    Posts
    104

    Re: Copy cell from 1 sheet to another sheet depending on what info is displayed in a cell

    Hi Pete

    Thanks for helping much appreciated.

    Your formula works great for the first cell but I can't get it to work with the other 3 where I need to get the cell values from W14, M14 and V17. I tried changing the L in your formula but it still returns the values from column L.

    So the =VLOOKUP(F1,strengths!$A$5:$L$28,12,0) where F1 is team A and strengths is name of relevant sheet works great to return value L17 in D5 as Team A is on row 17 of my strengths sheet but when I copy and paste the formula in to E9 where I still want to return a value from row 17 but now I want column V it doesn't change and just returns the column L value.


    Can you help further?

    Many thanks

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Copy cell from 1 sheet to another sheet depending on what info is displayed in a cell

    Column L is the 12th column of the table from column A to L, so as well as changing the L you must also change the column number that you want to get the corresponding value from. So, your table in all formulae can be $A$5:$W$28, and where you want to return from column L the third parameter of the VLOOKUP should be 12, where you want to get data from column M this is 13, and column V is 22, and so on.

    Hope this helps.

    Pete

  5. #5
    Forum Contributor
    Join Date
    11-24-2013
    Location
    Huddersfield, England
    MS-Off Ver
    2013
    Posts
    104

    Re: Copy cell from 1 sheet to another sheet depending on what info is displayed in a cell

    Many, many thanks Pete. Works a treat now. Not only have you saved me copious amounts of data input you have taught me something too. Excellent.

    Cheers

    Jonny

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Copy cell from 1 sheet to another sheet depending on what info is displayed in a cell

    Glad to hear it, Jonny.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, I would like to inform you that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete
    Last edited by Pete_UK; 11-24-2013 at 05:04 PM.

+ 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. Macro to copy data from one sheet to another depending on name in first cell
    By subtilty in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2013, 07:44 AM
  2. Copy cell on sheet one to sheet 2 depending on another cell
    By madpammy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2013, 02:47 PM
  3. Populating additional sheets with data from sheet 1 depending on info in cell
    By kd1950 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2012, 09:42 PM
  4. [SOLVED] Need to Copy cell info from one sheet to rows on a new sheet.
    By gavdean17 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2012, 03:07 PM
  5. [SOLVED] Copy row(s) to another sheet using date and cell info
    By Sigge in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-14-2012, 03:01 AM

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