# Using a cell to find previous days work

#### tcfd1166

##### Board Regular
Does anyone know how I can get a cell to show a sum of past 90 days of entries when I enter a date into another cell. Basically I would like when I enter yesterday's date in cell B3, it calculates from column L the previous 90 days where L days start in row 16. I have column B listing all the days of the year starting with Jan 1, 2007 through Dec 31, 2007. I am trying to keep up with employee days for any given past 3 months depending on what day I enter in cell B3.

### Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

#### al_b_cnu

##### Well-known Member
Hi,

Try
=SUMIF(B16:B380,">="&B3-90,L16:L380)-SUMIF(B16:B380,">"&B3,L16:L380)

#### tcfd1166

##### Board Regular
I tried this code, and it showed up "Fri 01/06/00" in the cell I want it to show the past 90 days.

#### al_b_cnu

##### Well-known Member
Hi,

Try formatting it as 'General'

#### tcfd1166

##### Board Regular
I figured it out, dumb me didn't check the cell format. Thanks, it fixed it.

#### tcfd1166

##### Board Regular
new question for same topic:

First off, the formula works great! thanks...

Second, I have crews that are working half of the year. I would like to know, just like before, using a certain date, how many days they are expected to work since Jan 1. Example, take today, 8/27/07, I would like to know how many days they should have worked since 01/01/07. I have been using =COUNT(B16:B264)*0.5 to get my answer, but I have to manually move the column in the formula. I would like it to work off my date I enter above to count the days and multiply by 0.5. Any clues?

Replies
1
Views
547
Replies
5
Views
268
Replies
0
Views
770
Replies
0
Views
470
Replies
4
Views
229

1,190,696
Messages
5,982,343
Members
439,775
Latest member
mathewduffy

### 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.

### Which adblocker are you using?

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

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