Associating a value with a cell
Results 1 to 6 of 6

Thread: Associating a value with a cell
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Aug 2018
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Associating a value with a cell

    Sup everyone, I know the basics of Excel but I have an issue that is beyond my knowledge. I need to have a value populate a cell and change depending on what value I select in the first cell.

    Here is a picture to clarify



    In the "bin size" column I am going to have A, B, C, and D. Each one of these letters I need to have a corresponding value that shows up in the "bin width" column. For example when I select or put in A I need 4.13 to show up in the width column. When I put B in I need 6 to show up in the other column. When I put in C I need 11 to show up in the associated column.

    What is the easiest way to do this because I have to mix and match these letters for almost 1000 cells and I don't want to have to go type in the bin width every time. Thanks!

  2. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    85,113
    Post Thanks / Like
    Mentioned
    44 Post(s)
    Tagged
    9 Thread(s)

    Default Re: Associating a value with a cell

    =VLOOKUP(X2,B:D,3,0)

    where X2 is equal to a value like A; column B houses bin sizes, and column D bin widths.

    Is this what you are after?
    Assuming too much and qualifying too much are two faces of the same problem.

  3. #3
    New Member
    Join Date
    Aug 2018
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Associating a value with a cell

    Quote Originally Posted by Aladin Akyurek View Post
    =VLOOKUP(X2,B:D,3,0)

    where X2 is equal to a value like A; column B houses bin sizes, and column D bin widths.

    Is this what you are after?
    I think that is close but I am still not getting it formatted correctly. I can't explain it well so let's try this


    The table circled in blue are the values I want to use. A-D are the bin size and the column beside it are the bin widths. The column circled in green is where I want to type A, B, C or D(bin size) and when I put in the letter I want the corresponding value (A-4.13, B-6, C-11, D-22) to populate in the same row where the red circle is.

    For example in cell F10 when I type C I want the value of 11 to show up in H10. Then go back and erase C in cell F10 and type in A and the value of 4.13 to show up in H10. Thanks for the help, Youtube videos were a bust lol.

  4. #4
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    85,113
    Post Thanks / Like
    Mentioned
    44 Post(s)
    Tagged
    9 Thread(s)

    Default Re: Associating a value with a cell

    In H10 enter:

    =VLOOKUP(F10,$F$4:$G$7,2,0)
    Assuming too much and qualifying too much are two faces of the same problem.

  5. #5
    New Member
    Join Date
    Aug 2018
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Associating a value with a cell

    Quote Originally Posted by Aladin Akyurek View Post
    In H10 enter:

    =VLOOKUP(F10,$F$4:$G$7,2,0)
    That did it, awesome thanks!!!! I don't know enough about excel but what made it work in that formula compared to your first? Is it the $ or what? I am not sure how to understand that formula for Vlookup.

  6. #6
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    85,113
    Post Thanks / Like
    Mentioned
    44 Post(s)
    Tagged
    9 Thread(s)

    Default Re: Associating a value with a cell

    Quote Originally Posted by rider_01 View Post
    That did it, awesome thanks!!!! I don't know enough about excel but what made it work in that formula compared to your first? Is it the $ or what? I am not sure how to understand that formula for Vlookup.
    You are welcome. The first one was generic; the second specific, that is, the generic one adapted to your specific layout.

    VLOOKUP(X2,B:D,3,0) --> VLOOKUP(F10,$F$4:$G$7,2,0)

    That is:


    X2 --> F10

    $B:$D ---> $F$4:$G$7

    3 --> 2, i.e. the result to be had is in the 2d column.

    0 --> 0, i.e. exact match required.

    Last edited by Aladin Akyurek; Aug 20th, 2018 at 01:49 PM.
    Assuming too much and qualifying too much are two faces of the same problem.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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