Home > OS >  Excel - I need the output like this. I used Xlookup for 1st and 3rd columns(sales). I'm not sur
Excel - I need the output like this. I used Xlookup for 1st and 3rd columns(sales). I'm not sur

Time:07-07

Original data:

2020/01/01 2020/01/01 Revenue 2020/01/07 2020/01/07 Revenue
500 7855.6 354 8745.4

Output:

Week Sale Revenue
2020/01/01 500 7855.6
2020/01/07 354 8745.4

CodePudding user response:

For Sale column-

=INDEX($A$2:$D$2,MATCH(A7,$A$1:$D$1,0))

For Revenue column-

=INDEX($A$2:$D$2,MATCH(TEXT(A7,"yyyy/mm/dd") & " " & $C$6,$A$1:$D$1,0))

enter image description here

  • Related