excel-formulaweekday

Excel: how to return data of the last weekday?


| Column A | Column B |
| 14/4     | 1        |
| 15/4     | 100      |
| 16/4     | 70       |
| 17/4     | 80       |

What is the formula I could use to extract the data (column B) of previous weekday please? So if I open the file on monday (17 april), formula should return 1. If I open the file on tuesday (18 apr), formula should return 80.

Thanks in advance for your help.


Solution

  • With your data in A1:B6 use the formula =XLOOKUP(WORKDAY(TODAY(),-1),$A$1:$A$6,$B$1:$B$6)

    enter image description here

    WORKDAY