Find cell values based on date / week and show the cell value in Label in userform

Wicked_

Board Regular
Joined
Jun 5, 2018
Messages
81
Hi.

I got a userform, and a sheet.
In the userform, i got a button that saves the date i the A row, and a spesific value in the B row, then next time i press that button, it adds a new date in A, and B.
Example.
A1: 19.02.20 and in B1: 1,5

And if i press the button again, it goes like:

A2: 19.02.21 and in B2: 1,5

and so on.

The date format is yy.mm.dd

What i would like is, in the userform, there is a label called Label 2, and in that label i want the sum of all the B's in the label for each week. (preferable it calculates it at once i insert the value, and not updating every week)

Meaning, if i press that button example 10 times during week 11, with B=2, the label would show 20 (kinda like =sum(B1:B30) in the sheets, but dynamic, in ways it calculate depending of what week its in)

Is this possible?

If possible, i would also have a label (lets call it label 3), that got a emtpy caption, but with the macro, it auto changes to example: Week 11, Week 12, Week 13 and so on, as the weeks go on.

Thanks :)
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,214,946
Messages
6,122,401
Members
449,081
Latest member
JAMES KECULAH

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