+ Reply to Thread
Results 1 to 3 of 3

find exact Matching column

  1. #1
    Forum Contributor
    Join Date
    03-07-2006
    Location
    India
    MS-Off Ver
    MSOffice 365 Professional 64 bit
    Posts
    108

    find exact Matching column

    Hi,

    i am stuck with a problem in matching a column using Match function.

    Problem:
    ---------
    i have 4 columns with numbers as headers viz


    StartDate: =NOW()

    No of Projects
    Tasks 2 4 6 >=7
    ----------------------------
    task 1 1.1 2.38 3.24 1.33
    task 2 1.5 2 1.2 2.12
    task 3 3.2 5 2.2 2.56
    task 4 2.9 3.96 1.3 4
    so the above 2,4,6,8 generally mean no of projects and the time in hours for each task completion as shown below.

    now i am using INDEX(MATCH, MATCH) to get the above data into a below table which shows a date and time for each task from the StartDate, excluding Holidays and Weekends (i am using WORKDAY function).

    Tasks 1 7 3 8 11
    Rpt 1 Rpt 2 Rpt 3 Rpt 4 Rpt 5
    --------------------------------------
    task 1 Dt Dt Dt Dt Dt
    task 2 Dt Dt Dt Dt Dt
    task 3 Dt Dt Dt Dt Dt
    task 4 Dt Dt Dt Dt Dt
    so this 2nd table shows that for each consecutive task:

    Rpt1 has 1 project and it needs to pull hours from "2" column from the 1st table.
    Similarly, Rpt2 has 7 Projects and needs to pull hours from ">=7" column.

    Here's where the trouble occurs. MATCH for column in INDEX function is unable to do an exact match (match_Type=0) & an approximate match (match_Type=1) yields incorrect results as its not able to find the above Project nos (1,7,3, 11) in 2nd table.

    So ideally looking at 2nd table, for each Task row,
    if Project value is 1 or 2, then MATCH should pull data from 2 column.
    if Project value is 3 or 4, then MATCH should pull data from 4 column.
    if Project value is 5 or 6, then MATCH should pull data from 6 column.
    if Project value is >=7, then MATCH should pull data from 8 column.

    How can this be achieved using MATCH function for Column using INDEX function?

    INDEX(MATCH(ROW), MATCH(COLUMN???))

    Any ideas how this can be achieved?
    Last edited by junoon; 04-19-2011 at 02:07 PM.

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

    Re: find exact Matching column

    Try, for the column argument....

    MATCH(IF(A1>=7,8,CEILING(A1,2)),column_headers,0)

    where A1 contains the Project Value....
    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
    Forum Contributor
    Join Date
    03-07-2006
    Location
    India
    MS-Off Ver
    MSOffice 365 Professional 64 bit
    Posts
    108

    Re: find exact Matching column

    Thanks.

    that did it!!

+ 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