+ Reply to Thread
Results 1 to 5 of 5

Returning a value in one column that corresponds to the same value in another cell

  1. #1
    Registered User
    Join Date
    06-17-2012
    Location
    Bristol
    MS-Off Ver
    Excel 365 Mac
    Posts
    25

    Returning a value in one column that corresponds to the same value in another cell

    Good evening.

    I am sure I am not explaining myself well in the title of this question but the attached file will, I hope, help. I know that I can solve this problem by loads of IF statements but wonder if there is a much easier way.

    I have a list of values that represents all the possible values that a singe, ever-changing, cell might be (say A1). All those values are in one column (say, C1:C41). In the adjacent column is another list of values (say, D1:D41), each one representing what its equivalent in the adjacent column needs to return in another single cell, say F5. So if cell A1 says 4.5, its identical value in C1:C41 is C3. I want cell F5 to return the value 49, which is the value in cell D3. I've played aroudn with INDEX and MATCH functions but cannot get anything to work. Any advice or solutions would be much appreciated.

    Regards.



    Andrew
    Attached Files Attached Files

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

    Re: Returning a value in one column that corresponds to the same value in another cell

    You can put this formula in F5:

    =IFERROR(VLOOKUP(A1,C:D,2,0),"not found")

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    06-17-2012
    Location
    Bristol
    MS-Off Ver
    Excel 365 Mac
    Posts
    25

    Re: Returning a value in one column that corresponds to the same value in another cell

    Oh that is so simple. Thank you so much. I feel very stupid about this. I thought that VLOOKUP wouldn't work. I am so grateful to you.

    Regards.



    Andrew

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

    Re: Returning a value in one column that corresponds to the same value in another cell

    You can use the VLOOKUP function where the lookup column is the left-most column of the table (in this case C:D), which it is. You can also use INDEX/MATCH, but it is a bit longer. If you wanted to do it the other way around, i.e. lookup column D and return the corresponding value from column C, then you would have to use INDEX/MATCH.

    Glad to have helped - if that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    You might also like to know 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

  5. #5
    Registered User
    Join Date
    06-17-2012
    Location
    Bristol
    MS-Off Ver
    Excel 365 Mac
    Posts
    25

    Re: Returning a value in one column that corresponds to the same value in another cell

    I will certainly do that (have already, actually). Once again, many thanks, Pete.

    Regards.



    Andrew

+ 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. Replies: 1
    Last Post: 08-23-2015, 06:11 PM
  2. Replies: 1
    Last Post: 06-11-2015, 01:29 PM
  3. Replies: 4
    Last Post: 02-10-2015, 02:56 PM
  4. Replies: 3
    Last Post: 07-26-2014, 08:02 AM
  5. Populate a listbox using data that corresponds to a certain id in the column
    By steveo993 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2014, 04:39 PM
  6. Replies: 1
    Last Post: 07-24-2014, 02:08 PM
  7. Replies: 0
    Last Post: 08-25-2005, 03:06 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