Forum Discussion

carlyfg's avatar
carlyfg
Copper Contributor
Apr 12, 2024

How do I show the data of one cell if another cell contains a set value?

Hi,

 

I'm creating a critical path timeline and want to input the start and end dates in a summary column using a formula. The dates are all in one row and all other rows relate to a specific task with cells containing an 's' for start and 'e' for end. See attached.

1 Reply

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    carlyfg With modern Excel that could be like this:

    Formula in C5 (and copy down):

    =XLOOKUP("s",$CE5:$CM5,dates,"")

    and in D5 (and copy down):

    =XLOOKUP("e",$CE5:$CM5,dates,"")

    If you don't have XLOOPUP, use

    =IFERROR(INDEX(dates,MATCH("s",$CE5:$CM5,0)),"")

    in C5 and similar in D5 by replacing "s" with "e".

     

Resources