User to select data

pastorkc

Board Regular
Joined
Jan 29, 2020
Messages
125
Office Version
  1. 2010
Platform
  1. Windows
I need a way to allow the user through dropdown boxes or other means such as userform to be able to select for example with year and which category and then it to return a sum value in a different cell. For example a dropdown box to allow them to select year 2023, and a drop down box to allow them to select Blue and then it sums everything from a separate worksheet that contains the information.

Table Data.xlsx
ABCDEFGHIJKL
1RideDATETypeIDTYPEROUTERouteIDCATEGORYCategoryIDRIDERSREVENUEREVENUEIDAMOUNTNOTES
27/1/20172TODDTODD3TODD81703
38/1/20172TODDTODD3TODD82166
49/1/20172TODDTODD3TODD82805
510/1/20172TODDTODD3TODD82995
611/1/20172TODDTODD3TODD82695
711/30/20171FixedBlue1Pax <5210
811/30/20171FixedBlue1Senior/DA3232
911/30/20171FixedBlue1ADA-Flex420
1011/30/20171FixedBlue1Transfers5260
1111/30/20171FixedBlue1Promo/Free60
1211/30/20171FixedBlue1Fare Revenue1$691
1311/30/20173SpecialSpecial4Special7227
1411/30/20171FixedRed2Pax (5-65)1306
1511/30/20171FixedRed2Pax <5235
1611/30/20171FixedRed2Senior/DA3367
1711/30/20171FixedRed2ADA-Flex419
1811/30/20171FixedRed2Transfers5210
1911/30/20171FixedRed2Promo/Free611
2011/30/20171FixedRed2Fare Revenue1$339
2112/1/20172TODDTODD3TODD82354
2212/31/20171FixedBlue1Pax (5-65)1786
2312/31/20171FixedBlue1Pax <5212
2412/31/20171FixedBlue1Senior/DA3280
2512/31/20171FixedBlue1ADA-Flex421
2612/31/20171FixedBlue1Transfers5294
2712/31/20171FixedBlue1Promo/Free63
Non-Table


Column A is the date, column D is the category and column H is the data I need to sum.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Perhaps this to get started:
Book1
ABC
12017Blue1918
Sheet4
Cell Formulas
RangeFormula
C1C1=SUMPRODUCT(Sheet3!H2:H27,--(YEAR(Sheet3!A2:A27)=A1),--(Sheet3!D2:D27=B1))
Cells with Data Validation
CellAllowCriteria
A1List2015,2016,2017,2018,2019,2020
B1ListTODD,Blue,Special,Red
 
Upvote 0
Perhaps this to get started:
Book1
ABC
12017Blue1918
Sheet4
Cell Formulas
RangeFormula
C1C1=SUMPRODUCT(Sheet3!H2:H27,--(YEAR(Sheet3!A2:A27)=A1),--(Sheet3!D2:D27=B1))
Cells with Data Validation
CellAllowCriteria
A1List2015,2016,2017,2018,2019,2020
B1ListTODD,Blue,Special,Red
Thank you, I will give it a shot
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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