+ Reply to Thread
Results 1 to 11 of 11

Excel 2003 - Returning the date in column for matching values

  1. #1
    Registered User
    Join Date
    04-04-2014
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    22

    Excel 2003 - Returning the date in column for matching values

    Hello,

    I am using Excel 2003. I have attached a data file here. Need help in getting the values in Q3, R3 and S3.

    Scenario:

    Q1 has the number = 1. So I want the cell Q3 to return 2/11/2013 as that is the cell corresponding to the Item1 (value specified in P3) with the value 1(value specified in Q1) in the cell. Basically, I need the date corresponding to cell which has the value of Q1 for the value of P3.

    Similarly, R2 must have the value 2/12/2013 and S3 must have the value 2/14/2013 returned.

    Please help.
    Attached Files Attached Files
    Last edited by SunRay; 04-04-2014 at 01:26 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,089

    Re: Excel 2003 - Returning the date in column for matching values

    Something like:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-04-2014
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Excel 2003 - Returning the date in column for matching values

    TMS,
    Thank you for your response.

    I am looking for the formula to determine the row number (in this example, the MATCH function refers to row 3) based on the criteria met.
    The MATCH formula should be able to determine the row number which matches the criteria since the list in column P would be dynamic.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Excel 2003 - Returning the date in column for matching values

    Hello SunRay,

    This formula can be placed in cell Q3. You can drag this across and then down each column.
    It will examine rows 3 through 6. the header row is set at row 2. If you expand the data then you will need to change row 6 to whatever the last row will be.

    =IF(ISNA(INDEX($B$2:$K$2,1,MATCH(COLUMN()-16,$B3:$K3,0))),"",INDEX($B$2:$K$2,1,MATCH(COLUMN()-16,$B3:$K3,0)))
    Attached Files Attached Files
    Last edited by Leith Ross; 04-04-2014 at 03:43 PM.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Registered User
    Join Date
    04-04-2014
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Excel 2003 - Returning the date in column for matching values

    Hello Leith Ross,

    Thank you for helping me out, you are very close to solving my issue!

    1) if the item# in column Q is not in the order of the number, which is going to be the case in reality, it does not show the correct dates. (See the file attached)
    2) Could you please tell me what you mean by 'If you expand the data then you will need to change row 6 to whatever the last row will be.' What and How do I change?
    3) Could you please explain what COLUMN()-16 means in the MATCH function?

    Looking forward to ur help as we are close to solving my issue.
    Attached Files Attached Files

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Excel 2003 - Returning the date in column for matching values

    Hello SunRay,

    #2 You can disregard this statement. I originally had a different formula.
    #3 The COLUMN statement returns the column number of the cell the formula is in. The formula is in column "Q" or the 17th column on the worksheet. The days are 1,2,3, etc. This yields the a value eequal to the day being searched for.

  7. #7
    Registered User
    Join Date
    04-04-2014
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Excel 2003 - Returning the date in column for matching values

    Hello Leith Ross,

    Thank you for the explanation, I now understand what COLUMN does in the formula.

    Could you please help me with the #1 that i mentioned in my earlier reply (if the item# in column P is not in the order of the number, which is going to be the case in reality, it does not show the correct dates. (See the file attached)). Please see the 'data ver1 - need updates.xls' file that I have attached in my last response.
    The formula should look up for the correct item# and then look up the day# that we need and return the date for that cell.

    In reality, I have the data from column O in a different sheet as the date range can go on and on from column B to anything...
    Last edited by SunRay; 04-04-2014 at 05:15 PM.

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Excel 2003 - Returning the date in column for matching values

    Hello SunRay,

    Here is the updated formula and workbook.

    =IF(ISERROR(OFFSET($A$2,0,MATCH(Q$1,OFFSET($B$3:$K$3,MATCH($P3,Item_Numbers,0)-1,0,1,10),0),1,1)),"",OFFSET($A$2,0,MATCH(Q$1,OFFSET($B$3:$K$3,MATCH($P3,Item_Numbers,0)-1,0,1,10),0),1,1))
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-04-2014
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Excel 2003 - Returning the date in column for matching values

    Hello Leith Ross,

    Thanks a ton, you have been really trying to help me out.

    Unfortunately, I am not that an expert in MS Excel and so have not been able replicate the formula to get it working in the sheet that I need.

    I have 2 sheets, where the formula should be in Sheet2 and the data for matching the Item#, Day# and the dates are in Sheet1.

    Request you to please help me get this formula working in the sheet that I have attache in this response.

    Thank you once again for your time.
    Attached Files Attached Files

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Excel 2003 - Returning the date in column for matching values

    Hello SunRay,

    The table on Sheet2 nows uses the data on Sheet1.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    04-04-2014
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Excel 2003 - Returning the date in column for matching values

    Hello Leith Ross,

    Thank you so much!! It works as I wanted it to!!!

    Thank you once again!!

+ 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: 2
    Last Post: 11-14-2013, 01:44 PM
  2. Replies: 2
    Last Post: 12-30-2011, 07:30 PM
  3. Replies: 8
    Last Post: 12-25-2011, 08:39 PM
  4. Excel 2003, returning 2 largest values
    By davros80 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-27-2008, 11:22 AM
  5. [SOLVED] Returning the last modified date to a cell in excel 2003
    By Dunc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-27-2006, 08:35 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