+ Reply to Thread
Results 1 to 3 of 3

Trouble with Index and match formula

Hybrid View

  1. #1
    Registered User
    Join Date
    08-03-2010
    Location
    puckeridge,herts
    MS-Off Ver
    Excel 2003
    Posts
    45

    Trouble with Index and match formula

    Hi All

    I am working on an absence report. I previously got some great help which worked for a while, until I realised that I need to expand it, but not sure how to.

    Sheet 1 is the data entry sheet, names in column B, and dates in row 4
    Sheet 2 is a report page where you can select a name and see what dates they were absent on.

    The formula in use on sheet 2 is:

    =INDEX(Sheet1!$C$4:$H$4,MATCH("A",INDEX(Sheet1!$C$5:$H$9,MATCH($C$5,names,0),0),0))

    What this does is return the first date of absence. I cant get it pick up the other dates.

    Attached is an example

    regards

    Darren
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Trouble with Index and match formula

    In cell C8 try this little formula, and copy down as far as needed:

    =IF(OR($C$5="",ISNA(MATCH($C$5,names,0))),"",IF(ROW(1:1)>COUNTIF(OFFSET(Sheet1!$C$5:$H$5,MATCH($C$5,names,0)-1,0),"A"),"",INDEX(Sheet1!$4:$4,LARGE(INDEX(COLUMN(Sheet1!C4:H4)*(OFFSET(Sheet1!$C$5:$H$5,MATCH($C$5,names,0)-1,0)="A"),0),COUNTIF(OFFSET(Sheet1!$C$5:$H$5,MATCH($C$5,names,0)-1,0),"A")-(ROW(1:1)-1)))))

  3. #3
    Registered User
    Join Date
    08-03-2010
    Location
    puckeridge,herts
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Trouble with Index and match formula

    thank you Andrew-R
    You solved 2 problems in 1 hit. Very happy indeed.
    Thanks again
    Darren

+ 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