I want to use Vlookup to remain 2 values, every value from different sheet in excel

I have these table:

Sheet1

imagen

Sheet2

imagen

Sheet3

imagen

I need to obtain on B2(Sheet1), the remain of B2 (Sheet2) - B2(Sheet3) but have in count the A column, If it is 1, remain the values of B2 related to that day

Can you please elaborate, your description is very concise

In sheet1 on B2 I need this value =B2(Sheet2)-B2(Sheet3) but taking in count the first column(Days) as you can see in the last spreadsheet “sheet3” there just 1 and 3 but in the others there more numbers