Get data depending on the date

chaboyski

Board Regular
Joined
Aug 18, 2020
Messages
59
Office Version
  1. 2016
Platform
  1. Windows
Hi guys,

just wondering how i can get the data from column I and feed show it in column C depending on the date if it is less than or equal to date. i need july 31 - Aug 4 to show 994, then, aug 5-6(weekend) would be 0, then Aug 7 - 11 1235, then 0 again for Aug 12 and 13 since its weekend.

Book1
BCDEFGHI
1Data
231-JulClean
31-Aug31-Jul994
42-Aug7-Aug1235
53-Aug14-Aug1236
64-Aug21-Aug850
75-Aug28-Aug425
86-Aug4-Sep485
97-Aug
108-Aug
119-Aug
1210-Aug
1311-Aug
Sheet1
Cell Formulas
RangeFormula
B3:B13B3=B2+1
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
How about
Excel Formula:
=IF(WEEKDAY(B2,2)>5,0,INDEX($I$3:$I$8,MATCH(B2,$H$3:$H$8,1)))
 
Upvote 1
Solution
Hey
This in C2 should help, just fill it down
Excel Formula:
=IF(OR(WEEKDAY(B2)=7,WEEKDAY(B2)=1),0,VLOOKUP(B2-(WEEKDAY(B2,2)-1),$H$3:$I$8,2,0))
 
Upvote 0
Did you try the formula I suggested?
 
Upvote 1

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top