+ Reply to Thread
Results 1 to 29 of 29

index match formula

  1. #1
    Forum Contributor
    Join Date
    05-08-2005
    Location
    Australia
    MS-Off Ver
    excel 2019
    Posts
    112

    index match formula

    Hi,

    I have a roster eg

    date 1/1 2/1 3/1

    john night day off
    andrew day off night
    fred off night day


    in a cell I would like returned the name of the person who had done a particular night. eg. who did night shift on 2/1 ie. fred.

    I know its a index match, but getting it all wrong or is there another solution.

    andrewm

  2. #2
    Forum Contributor
    Join Date
    02-19-2005
    Location
    Gurgaon,India
    MS-Off Ver
    2007,2010,2013
    Posts
    180
    Hi,

    See the attachment.

    HTH
    Attached Files Attached Files
    Kris

  3. #3
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  4. #4
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  5. #5
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  6. #6
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  7. #7
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  8. #8
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  9. #9
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  10. #10
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  11. #11
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  12. #12
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  13. #13
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  14. #14
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  15. #15
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  16. #16
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  17. #17
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  18. #18
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  19. #19
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  20. #20
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  21. #21
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  22. #22
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  23. #23
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  24. #24
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  25. #25
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  26. #26
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  27. #27
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  28. #28
    Bob Phillips
    Guest

    Re: index match formula

    Andrew,

    One solution

    =INDEX(A2:A4,MATCH("Night",INDIRECT(CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"
    2:"&CHAR(65+MATCH(--"2005-01-02",B1:D1,0))&"4"),0))

    change the ranges to suit.

    --
    HTH

    Bob Phillips

    "andrewm" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >
    > --
    > andrewm
    > ------------------------------------------------------------------------
    > andrewm's Profile:

    http://www.excelforum.com/member.php...o&userid=23130
    > View this thread: http://www.excelforum.com/showthread...hreadid=388302
    >




  29. #29
    Aladin Akyurek
    Guest

    Re: index match formula

    Let A1:D1 house dates, with the label 'date' in A1.
    Let A3:D5 house the rest of the data.

    In H2 enter:

    =INDEX($A$3:$A$5,MATCH($G2,INDEX($B$3:$D$5,0,MATCH($F2,$B$1:$D$1,1)),0))

    where F2 houses a date of interest like 2/1 and G2 a value like "night".

    andrewm wrote:
    > Hi,
    >
    > I have a roster eg
    >
    > date 1/1 2/1 3/1
    >
    > john night day off
    > andrew day off night
    > fred off night day
    >
    >
    > in a cell I would like returned the name of the person who had done a
    > particular night. eg. who did night shift on 2/1 ie. fred.
    >
    > I know its a index match, but getting it all wrong or is there another
    > solution.
    >
    > andrewm
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

+ 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