SUMIFS

Ahmed Mostafa

New Member
Joined
May 15, 2024
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
Hello All,

i am working in an hotel and i have been receiving requests for groups, like he wants 20 Rooms from 11-05 till 17-05.
so i was trying to come with one equation to distribute the rooms over the dates like seeing each date will have how many rooms .
so from 11-05 till 17-05 , that mean we have 20 rooms on (11,12,13,14,15,16) May .

i have tried the sum product function but it wasn't as i hoped , the function that will give the result i want will be the Sumifs , however i failed to make the criteria dynamic


Start Date End Date# RoomsDate
11-05-2413-05-24
10​
11-05-24
15-05-2417-05-24
10​
12-05-24
12-05-2413-05-24
10​
13-05-24
15-05-2417-05-24
10​
14-05-24
22-05-2423-05-24
10​
15-05-24
25-05-2427-05-24
10​
16-05-24
26-05-2427-05-24
10​
17-05-24
29-05-2431-05-24
10​
18-05-24
29-05-2430-05-24
40​
19-05-24
01-06-2403-06-24
10​
20-05-24
02-06-2403-06-24
30​
21-05-24
05-06-2407-06-24
10​
22-05-24
05-06-2406-06-24
20​
23-05-24
08-06-2410-06-24
10​
24-05-24
09-06-2410-06-24
15​
25-05-24
12-05-2414-05-24
20​
26-05-24
12-05-2418-05-24
10​
27-05-24
15-05-2417-05-24
30​
28-05-24
16-05-2420-05-24
10​
29-05-24
19-05-2425-05-24
15​
30-05-24



with taking in mind that the end date is not calculated as the rooms will be checked out on this date.

so i have been trying to see on each night how many room will i receive

i have been trying to manipulate using following SUMIFS


SUMIFS(C:C,A:A,"<=12-05-2024",B:B,">12-05-2024")

but i neet to make the date dynamic
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi Ahmed,
welcome to the forum.
Excel Formula:
=SUMIFS(C:C,A:A,"<=12-05-2024",B:B,">12-05-2024")
What you could do:
Excel Formula:
=SUMIFS(C:C,A:A,"<=" & K1,B:B,">" & K1)
You can put your date in cell K1, so it's dynamic. See this site for more examples: Sum if cell contains text in another cell
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

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