1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Simple lookup in Excel 2003

Discussion in 'Business Applications' started by davnon, Apr 25, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. davnon

    davnon Thread Starter

    Joined:
    Jul 23, 2006
    Messages:
    62
    I have been using Excel for many years and somehow I can't figure out a simple lookup function: How do I find the column reference of the first occurrence of a value in a row? Basically, I want to display in the first cell of a row the table header (corresponding to the column) where the specified value is found.
    Thanks. I'm pretty sure it should be very simple... or not?
     
  2. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    Hi!

    Maybe try a different approach...

    Code:
    =INDEX(1:2,2,MATCH([I]YourValueToMatch[/I],1:1,0))
    If this is not what you're looking for, perhaps you could explain a little more and detail where your data is, what you're searching for and what you'd like returned. Example spreadsheets can be uploaded for examples.

    HTH
     
  3. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Please upload a sample workbook showing your data layout.

    Regards,
    Rollin
     
  4. davnon

    davnon Thread Starter

    Joined:
    Jul 23, 2006
    Messages:
    62
    I'm not sure how INDEX would work here; maybe I am not using it correctly. Attached is an illustration of what I need. It is basically a bar chart of projects, where the "bar" is shown as a list of sequential month numbers for the duration of the project. I am using Excel, because there are a whole lot of calculations that are not shown in this example. I want the "start date" to be generated automatically according to the first month of the project, because the project bar can move frequently.
    Hope I've explained myself better.
    Thanks.
     

    Attached Files:

  5. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    19,840
    So you want Column B to reflect the Date in Row 1 based on where the "1" is entered?
     
  6. davnon

    davnon Thread Starter

    Joined:
    Jul 23, 2006
    Messages:
    62
    Exactly!
     
  7. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    Well, I used this and copied down. Worked for me...

    Code:
    =IF(ISNA(MATCH("1",$C6:$Z6,0)),"",INDEX($C$1:$Z6,1,MATCH("1",$C6:$Z6,0)))
    HTH
     
  8. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    19,840
    (y) Zack
     
  9. davnon

    davnon Thread Starter

    Joined:
    Jul 23, 2006
    Messages:
    62
    Thanks Zack and OBP! It does work indeed :)
    Quite amazing that there isn't something simpler. HLOOKUP does a similar function... but not quite what I wanted.
    Cheers!
     
  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/707070

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice