If statement for calculate value from cell criteria and between two dates

kitsa

Board Regular
Joined
Mar 4, 2016
Messages
111
Office Version
  1. 365
  2. 2016
Hi,
I'm confused on how I would write an if statement on this issue. I have a cell with e.g. AW018 in cell (D6) and I have dates across rows (2:2). I'm trying to find the value of AW018 (F6:L6) if I use two dates e.g. 11/03/22 to 16/03/22, should equal $8,075.00
Can someone please help how do I write this?
 

Attachments

  • calculate value against date and criteria.JPG
    calculate value against date and criteria.JPG
    131.2 KB · Views: 7

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
One option would be a Sumproduct(). In the example below, I only manually entered enough data for demonstration purposes. You'll need to adjust the ranges D3:D7 and F3:L7 to suit your actual ranges.

hide.xlsb
BCDEFGHIJKLMNOPQ
1SiteClientJob CodeRateCostCostCostCostCostCostCost
2Date10/03/2211/03/2212/03/2213/03/2214/03/2215/03/2216/03/22
3AD006$ 95.00$ -$ -$ -$ -$ -$ -$ -
4AS002$ 95.00$ -$ -$ -$ -$ -$ -$ -
5AS003$ 105.00$ 3,360.00$ 2,520.00$ -$ -$ 1,260.00$ -$ -
6AW018$ 95.00$ 2,090.00$ 1,520.00$ 1,900.00$ -$ 1,615.00$ 1,520.00$ 1,520.00Job CodeStartEndTotal
7AW021$ 100.00$ -$ -$ -$ -$ -$ -$ -AW01811/03/2216/03/22$ 8,075.00
8
Sheet4
Cell Formulas
RangeFormula
Q7Q7=SUMPRODUCT((D3:D7=N7)*(F2:L2>=O7)*(F2:L2<=P7)*(F3:L7))
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

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