Date Question

ststern45

Well-known Member
Joined
Sep 17, 2005
Messages
958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Happy Holidays everyone,

I have a date formula question.

In cell column 1 through 1000 I have a list of invoice dates from most current 12/25/2022 in cell A1 and the last date July 5, 2021 in cell A1000.
There are some dates that are missing and dates that are duplicates. The duplicate dates follow each other and not scattered throughout cell range A1 through A1000.
My question is the following:

Suppose I have a date 12/1/2022 but the next available date is 11/28/2022. Can a formula calculate the 1st date before 12/1/2022
Or calculate how many dates for December 2022 are in cell range A1 through A1000, how many dates for November 2022 are in cell range A1 through A1000?

Thank you in advance!!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Not too difficult, if you could post a sample sheet (via XL2BB)
 
Upvote 0
I found a solution
=SUMPRODUCT((MONTH($A$1:$A$100)=$B$1)*(YEAR($A$1:$A$100)=$C$1))
Thanks
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,394
Members
448,957
Latest member
Hat4Life

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