index+match

kelvin_9

Active Member
Joined
Mar 6, 2015
Messages
444
Office Version
  1. 2019
HI All,

to simplfy my formula at cell D54, is there any better formula(index+match) i can use to return the result?

HOTEL.xlsx
ABCDEFGHI
51
52up-to-date2000
53dateopening quantityrental quantity (pre booked)rental quantity (actual)net balancereturn quantityclosing quantityremarks
54Saturday, 1 July 202320202020
55Sunday, 2 July 2023   
56Monday, 3 July 2023   
57Tuesday, 4 July 2023   
58Wednesday, 5 July 2023   
59Thursday, 6 July 2023   
60Friday, 7 July 2023   
61Saturday, 8 July 2023   
DLH - DATA
Cell Formulas
RangeFormula
G52,D52:E52D52=SUM(D54:D84)
D54D54=SUM('DLH - GUEST'!C56,'DLH - GUEST'!C61,'DLH - GUEST'!C66,'DLH - GUEST'!C71,'DLH - GUEST'!C76,'DLH - GUEST'!C81,'DLH - GUEST'!C86,'DLH - GUEST'!C91,'DLH - GUEST'!C96,'DLH - GUEST'!C101,'DLH - GUEST'!C106,'DLH - GUEST'!C111,'DLH - GUEST'!C116,'DLH - GUEST'!C121,'DLH - GUEST'!C126,'DLH - GUEST'!C131,'DLH - GUEST'!C136,'DLH - GUEST'!C141,'DLH - GUEST'!C146,'DLH - GUEST'!C151)
C55:C61C55=IF(M54="","",IF(M54="no",H54,IF(OR(L54="/"),$C$54,IF(AND(M54="yes",L54="park to hotel"),(H54+K54),IF(AND(M54="yes",L54="return to park"),(H54+K54))))))
F54:F61F54=IFERROR((C54-E54),"")
H54:H61H54=IFERROR((C54-E54+G54),"")


source come from this page:
HOTEL.xlsx
ABCDE
51Saturday, 1 July 2023Sunday, 2 July 2023Monday, 3 July 2023
521guest name
53guest contact
54booking number
55number of stay
56pre booked quantity10
572guest name
58guest contact
59booking number
60number of stay
61pre booked quantity10
623guest name
63guest contact
64booking number
65number of stay
66pre booked quantity
674guest name
68guest contact
69booking number
70number of stay
71pre booked quantity
DLH - GUEST



THANK YOU VERY MUCH FOR YOUR GUIDANCE
 
Yes, in exactly the same way as for the sumifs.
something wrong?o_O

HOTEL.xlsx
ABCD
51JULY 2023number of guestnumber of staypre booked quantity
52010100
53Saturday, 1 July 2023010100
DLH - SUMMERY
Cell Formulas
RangeFormula
B52:D52B52=SUM(B53:B83)
B53B53=COUNTIFS(INDEX('DLH - GUEST'!$C$52:$AG$151,0,MATCH(A53,'DLH - GUEST'!$C$51:$AG$51,0)),"guest name")
C53C53=SUMIFS(INDEX('DLH - GUEST'!$C$52:$AG$151,0,MATCH(A53,'DLH - GUEST'!$C$51:$AG$51,0)),'DLH - GUEST'!$B$52:$B$151,C$51)
D53D53=SUMIFS(INDEX('DLH - GUEST'!$C$52:$AG$151,0,MATCH(A53,'DLH - GUEST'!$C$51:$AG$51,0)),'DLH - GUEST'!$B$52:$B$151,D$51)



HOTEL.xlsx
ABC
51Saturday, 1 July 2023
521guest namea
53guest contact
54booking number
55number of stay10
56pre booked quantity100
DLH - GUEST
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
It should be
Excel Formula:
=COUNTIFS(INDEX('DLH - GUEST'!$C$52:$AG$151,0,MATCH(A53,'DLH - GUEST'!$C$51:$AG$51,0)),"<>",'DLH - GUEST'!$B$52:$B$151,"guest name")
 
Upvote 0
It should be
Excel Formula:
=COUNTIFS(INDEX('DLH - GUEST'!$C$52:$AG$151,0,MATCH(A53,'DLH - GUEST'!$C$51:$AG$51,0)),"<>",'DLH - GUEST'!$B$52:$B$151,"guest name")
Fluff, thank you very much for your kind help 🙏 :)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,172
Messages
6,123,438
Members
449,100
Latest member
sktz

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