Populate date within range using criteria

TXTX

New Member
Joined
Mar 31, 2023
Messages
4
Office Version
  1. 2019
Having trouble creating a formula that will populate "pay date" based on first criteria "color" and date that falls within date range. Is there a simple way to do this? For exampling hoping to achieve that the formula will start by identifying "BLUE" in Color column, Then return value from Pay Date column that falls between 1/1/2007 and 12/31/2007 (i.e. 5/1/2007)

1680274307754.png
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi & welcome to MrExcel.
Will there only ever be one date that matches all criteria?
 
Upvote 0
That is correct. From my dataset, there will never be more than one date that 1) falls between the date range and 2) meets the color criteria.
 
Upvote 0
Ok, how about
Excel Formula:
=SUMIFS(C:C,A:A,E3,C:C,">="&F1,C:C,"<="&F2)
 
Upvote 0
Correction, there never be more than one date and there may also be no date within the range. If the date range was changed to 1/1/22 and 12/31/22, the result is "0", but is there a way for the value to return "blank" instead of zero?

I currently have =IF(SUMIFS(C:C,A:A,E3,C:C,">="&F1,C:C,"<="&F2)=0,"",SUMIFS(C:C,A:A,E3,C:C,">="&F1,C:C,"<="&F2)). But I wonder if there's another formula that's not as long but achieves the same result.
 
Upvote 0
How about
Excel Formula:
=iferror(1/(1/SUMIFS(C:C,A:A,E3,C:C,">="&F1,C:C,"<="&F2)),"")
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,144
Members
453,021
Latest member
Justyna P

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