Search code examples
excelwps

Show cell with criteria using IF formula, Index and Match


enter image description here

I want to have a plan and actual for daily from the table given above. For example, If today is 3rd May, i want it to show only data from 3 May. Is this possible, i have tried working around with If, index and match but cant seem to work.


Solution

  • Assuming both the dates in table headers and the date you are looking up are both actual dates, you can do it this way:

    Formula for the "Plan" column:

    =INDEX($1:$11,A18*2,MATCH($C$15,$1:$1,0))
    

    Formula for the "Actual" column:

    =INDEX($1:$11,A18*2+1,MATCH($C$15,$1:$1,0))
    

    Put these in B18 and C18 respectively and expand down.

    Changing the date in C15 will update the table below with the data from table above.

    enter image description here