How can change data every 5 days?

ngocanh87

Board Regular
Joined
Mar 16, 2016
Messages
85
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hello all,

Data at M4,L4 change every 5 days: 1-5,6-10...,26-end

Day 01Feb, at E6=$M$4, E7=$L$4,
Day 06Feb, at F6=$M$4, E7=$L$4
...
Day 26Feb, at J6=$M$4, E7=$L$4

How can use vba or formula to change data of E6,F6..J6 follow M4,L4. Thank all

Book1
ABCDEFGHIJKLM
1 KẾT QUẢ SẢN LƯỢNG VÀ ĐƠN GIÁ 2023 14/02/2023
2VND => USDSUM WEIGHT
3 KẾT QUẢ KINH DOANH THÁNG 02 Unit / ĐVT:MT; USD 【確定計数】
4 Budget (Dự toán) Transit Goods (Hàng đi đường) 5日 (01 -05) 10日 (06 - 10) 15日 (11 - 15) 20日 (16 - 20) 25日 (21 - 25) 28日 (26 - 28) 2137280,4092029,712
5
6 Weight Shipment / Trọng lượng -2.0302.0302.0302.0302.0302.030
7 Amount / Thành tiền -2.137.2802.137.2802.137.2802.137.2802.137.2802.137.280
8 Price/ Đơn giá -1.0531.0531.0531.0531.0531.053
Sheet1
Cell Formulas
RangeFormula
J1J1=TODAY()
E6:J6E6=$M$4
E7:J7E7=$L$4
E8:J8E8=E7/E6
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Different approach:
Excel Formula:
E6=IF(CEILING(DAY(TODAY())/5,1)=COLUMN(A1),$M$4,"")
 
Upvote 0
Sorry I type at E6 error

1676355565415.png
 
Upvote 0
Oh it worked, but how can I fix formula by value.
Ex: this form I will user for month, today 14Feb G6: 2030. If today 16Feb how data at G6 will not change ? thank you
1676356313182.png
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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