Formula Help Please

Rubber Beaked Woodpecker

Board Regular
Joined
Aug 30, 2015
Messages
205
Office Version
  1. 2021
Hi all :-)

Column A displays the date in the following format 26/07/2024
Column X displays the number of hours worked for each date.

I would like a formula in cell Y1 to display the total number of hours worked for the last six days but I am unable to fathom this :cautious:

Any help please RBW
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
So much is dependent upon the structure of your data, it would be helpful to see it.

Is your data sorted by date?
If so, in ascending or descending order?

When you say you want the hours worked in the last 6 days, do you mean the last 6 entries, or just during the last 6 days (so there could be less than 6 entries)?

And how are your hours entered? Is just a regular number, or is it entered in a time format?

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
=SUMIFS(X2:X17,A2:A17,">="&TODAY()-6,A2:A17,"<="&TODAY())
Book8
ABTUVWXY
156:00
27/22/2413:00
37/23/249:00
47/24/2412:00
57/25/2413:00
67/26/249:0056:00
77/27/2412:00
87/28/2413:00
97/29/249:00
107/30/2412:00
117/31/2413:00
128/1/249:00
138/2/2412:00
148/3/2413:00
158/4/249:00
168/5/2412:00
178/6/24
Sheet1
Cell Formulas
RangeFormula
Y1Y1=SUMIFS(X2:X17,A2:A17,">="&TODAY()-6,A2:A17,"<="&TODAY())
Y6Y6=SUM(X2:X6)
 
Upvote 1
Solution
=SUMIFS(X2:X17,A2:A17,">="&TODAY()-6,A2:A17,"<="&TODAY())
Book8
ABTUVWXY
156:00
27/22/2413:00
37/23/249:00
47/24/2412:00
57/25/2413:00
67/26/249:0056:00
77/27/2412:00
87/28/2413:00
97/29/249:00
107/30/2412:00
117/31/2413:00
128/1/249:00
138/2/2412:00
148/3/2413:00
158/4/249:00
168/5/2412:00
178/6/24
Sheet1
Cell Formulas
RangeFormula
Y1Y1=SUMIFS(X2:X17,A2:A17,">="&TODAY()-6,A2:A17,"<="&TODAY())
Y6Y6=SUM(X2:X6)
Thank you works very well :-)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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