Matching Logic Function

Walker_Ice

Board Regular
Joined
Oct 6, 2023
Messages
50
Office Version
  1. 2021
Platform
  1. MacOS
Hi everyone,

I have a minor issue and I'm not sure the best way to solve this problem. I believe I have to use a mixture of maybe the MATCH & INDEX function with some logic as well but I wanted to see if anyone had any ideas on how to go about this.

I'm trying to make so that based on the month and year, selected, it will divide the number of appointments by the amount of money made in the corresponding month and year from the chart. If "All" is selected it will add the revenue from all the years for that month.

ANy help would be greatly appreciated.

TEsting_Excel_File.xlsx
ABCDEFGHIJKLMN
1Business Analysis
2Monthly Income ReportJANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
32022$0.00$0.00$0.00$4,300.00$88,888.00$0.00$900.00$750.00$999.00$0.00$0.00$0.00
42023$1,400.00$3,890.00$4,555.00$70,576.00$16,588.00$1,385.00$4,700.00$1,406.00$15,000.00$30,090.00$50,000.00$20,000.00
52024$0.00$0.00$6,800.00$0.00$0.00$0.00$0.00$0.00$40,000.00$0.00$0.00$0.00
62025$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00$0.00
7
8
9
10
11
12Select Year:All
13Month:# of BookingsAvg price per Booking
14JAN50$28.00
15FEB103$37.77
16MAR149$30.57
17APR309$228.40
18MAY233$71.19
19JUN179$7.74
20JUL745$6.31
21AUG267$5.27
22SEP92$163.04
23OCT2078$14.48
24NOV80$625.00
25DEC987$20.26
Sheet1
Cell Formulas
RangeFormula
I14I14=C4/H14
I15I15=D4/H15
I16I16=E4/H16
I17I17=F4/H17
I18I18=G4/H18
I19I19=H4/H19
I20I20=I4/H20
I21I21=J4/H21
I22I22=K4/H22
I23I23=L4/H23
I24I24=M4/H24
I25I25=N4/H25
Cells with Data Validation
CellAllowCriteria
J12ListAll, 2022, 2023,2024,2025
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
1235.xlsm
ABCDEFGHIJKLMN
1Business Analysis
2Monthly Income ReportJANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
320220004300888880900750999000
42023140038904555705761658813854700140615000300905000020000
520240068000000040000000
62025000000000000
7ALL14003890113557487610547613855600215655999300905000020000
8
9
10
11
12Select Year:ALL
13Month:# of BookingsAvg price per Booking
14JAN5028.00
15FEB10337.77
16MAR14976.21
17APR309242.32
18MAY233452.69
19JUN1797.74
20JUL7457.52
21AUG2678.07
22SEP92608.68
23OCT207814.48
24NOV80625.00
25DEC98720.26
Sheet20
Cell Formulas
RangeFormula
C7:N7C7=SUM(C3:C6)
I14:I25I14=INDEX($A$2:$N$7,MATCH($J$12,$A$2:$A$7,0),MATCH(G14,$A$2:$N$2,0))/H14
Cells with Data Validation
CellAllowCriteria
J12List=$A$3:$A$7
 
Upvote 0
Hi, here's another option that doesn't need "All" total row.

Book1
ABCDEFGHIJKLMN
1Business Analysis
2Monthly Income ReportJANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
320220004300888880900750999000
42023140038904555705761658813854700140615000300905000020000
520240068000000040000000
62025000000000000
7
8
9
10
11
12Select Year:All
13Month:# of BookingsAvg price per Booking
14JAN5028
15FEB10337.767
16MAR14976.2081
17APR309242.317
18MAY233452.687
19JUN1797.73743
20JUL7457.51678
21AUG2678.07491
22SEP92608.685
23OCT207814.4803
24NOV80625
25DEC98720.2634
Sheet1
Cell Formulas
RangeFormula
I14:I25I14=SUM(INDEX($C$3:$N$6,IF($J$12="All",0,MATCH($J$12,$A$3:$A$6,0)),MATCH($G14,$C$2:$N$2,0)))/H14
 
Upvote 0
Solution

Forum statistics

Threads
1,215,140
Messages
6,123,267
Members
449,093
Latest member
Vincent Khandagale

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