Version of Lookup formula?

New Contributor

Have a table dates across the top and items down the side.


The body of the table gets populated with "1s" which auto formats to a cell colour.


Id like to create a column that looks up when a row has a "1" in and then returns the date in the column header.


Just struggling to find what sort of formula to use for it any guidance would be appriciated

11 Replies
I suppose you want to return the date IF the cell contains 1; otherwise, you want to return empty text. I hope you now know what formula to use.




I had tried using "IF" but the "1" could be in any cell across the table, and i didnt want to have to create a long formula with 20 "IF" Logical tests!
Is there a shorter way of achieving the same thing?

@Detlef Lewin
Many thanks!

@Detlef Lewin 

If there is more than one cell filled in a row, the formula picks up the cell furthest to the right.

This is fine in the main but just wanted to know if there was any way of changing it to pick the first cell it comes to? (furthest to the left?)


That would be:



I’m just curious. What would be the equivalent formula to achieve the same result using LOOKUP and OUR sexy PI() as the lookup_value argument?

Dear @Twifoo,


I have no idea. The problem is that LOOKUP() works from right to left.


Hello @Detlef Lewin,
Just to satisfy my curiosity, this is the equivalent of the INDEX-MATCH formula using LOOKUP-PI.
Indubitably, INDEX-MATCH formula is preferred but the foregoing formula satisfied my curiosity!


When dynamic arrays are released, multiple matches will be returned by

= FILTER( Date, Criterion )

To do something similar now would need

= SMALL( IF( Criterion, Date ), {1,2,3} )

The dates could also be listed in a wrapped cell using

= TEXTJOIN( CHAR(10), TRUE, IF( Criterion, TEXT(Date,"dd mmm"), "" ) )


I expected that a possible solution would be considerably longer and more complex.


Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies