J VBA
J VBA

Reputation: 168

Get header row value from TODAY() found in multi-D array

I have a Multi-D array of dates (say "F3:AO21"), and want to use TODAY() to find which column in that array matches TODAY(). Once found, to return the value of the matching column, but always row 2.

No matter what column TODAY() is found, the value returned should always be: Column = column of TODAY() found; Row = row 2.

Thanks, Jason.

Upvotes: -1

Views: 28

Answers (1)

Scott Craner
Scott Craner

Reputation: 152660

Use AGGREGATE inside an INDEX:

=INDEX(2:2,AGGREGATE(15,7,COLUMN(F3:AO21)/(F3:AO21=TODAY()),1))

enter image description here

Upvotes: 2

Related Questions