+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : How to Get Value from Left Side Cell?

  1. #1
    Registered User
    Join Date
    07-25-2009
    Location
    China
    MS-Off Ver
    Excel 2007
    Posts
    4

    Wink How to Get Value from Left Side Cell?

    Hello Excel Experts,

    I need your advice on my problem.
    Lets say I have data product codes and prices from 5 vendors.
    (I attached the graphic for better viewer)
    I want to get the lowest price from the table. I know how to do it by using formula MIN().
    But my problem is I also want to get the product code from the left side the lowest price.
    For example:
    Row 1: Lowest=0.1 - product code=code1
    Row 2: Lowest=1 - product code=code6
    Row 3: Lowest=0.2 - product code=code19
    Row 4: Lowest=0.15 - product code=code8

    I need the data for first and second columns that I marked the header as red in the illustration picture I attached.

    What formula should I use to achieve that??
    I have tried googling many days, but still have no luck with the formula.
    Any helping will be deeply appreciate.

    Thanks & Regards,
    Agus
    Attached Images Attached Images
    Last edited by NBVC; 09-23-2010 at 09:01 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to Get Value from Left Side Cell?

    Try:

    =Index(B2:B5,Match(Min(C2:C5),C2:C5,0))

    you can replace MIN(C2:C5) with cell containing your original MIN formula.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-25-2009
    Location
    China
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to Get Value from Left Side Cell?

    Quote Originally Posted by NBVC View Post
    Try:

    =Index(B2:B5,Match(Min(C2:C5),C2:C5,0))

    you can replace MIN(C2:C5) with cell containing your original MIN formula.
    Hello NVBC,

    Sorry, probably I dont clearly explain what I need.
    So basically I need to find the lowest price per row (at column C in the picture I use MIN function) and then get the product code from the left side of the lowest price (then insert it to column B).
    I believe if I can get for the first row, I can drag and drop for whole rows.
    How do I do that?

    Thanks for your further advice.

    regards,
    Agus

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to Get Value from Left Side Cell?

    Hi,
    You would do best to post a sample workbook rather than a picture.

    It should clearly illustrate your problem and not contain any sensitive data.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to Get Value from Left Side Cell?

    Okay, in B2:

    =INDEX(D2:M2,MATCH(C2,D2:M2,0)-1) copied down

    in A2:

    =INDEX($D$1:$M$1,MATCH(C2,D2:M2,0)-1)

    or

    =INDEX($D$1:$M$1,MATCH(B2,D2:M2,0))

  6. #6
    Registered User
    Join Date
    07-25-2009
    Location
    China
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to Get Value from Left Side Cell?

    Quote Originally Posted by Marcol View Post
    Hi,
    You would do best to post a sample workbook rather than a picture.

    It should clearly illustrate your problem and not contain any sensitive data.
    Hi Marcol, thanks for your advice.. I have attached the file with file + instruction inside.
    Hopefully make everything clear.

    Cheers,
    Agus
    Attached Files Attached Files

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to Get Value from Left Side Cell?

    As per my last suggestion try:

    =INDEX(C2:N2,MATCH(B2,C2:N2,0)-1)

    copied down.

  8. #8
    Registered User
    Join Date
    07-25-2009
    Location
    China
    MS-Off Ver
    Excel 2007
    Posts
    4

    Smile Re: How to Get Value from Left Side Cell?

    Quote Originally Posted by NBVC View Post
    As per my last suggestion try:

    =INDEX(C2:N2,MATCH(B2,C2:N2,0)-1)

    copied down.
    Hi Moderator, u r brilliant. A ton of thanks for you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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