Filtering in Corresponding Gross Value using VBA in Excel

akpflow

New Member
Joined
Aug 2, 2016
Messages
9
Good day... I'm new in this forum...
I have a spreadsheet that uses filter to narrow down my search/selection but the gross value doesn't change.
I would love an excel shhet that has the corresponding gross value as the filter changes.
I can send you a dummy file for clarity.


Best,
Akpflow[TABLE="width: 500"]
<tbody>[TR]
[TD]Filter 1[/TD]
[TD]Filter 2
[/TD]
[TD]Date
[/TD]
[TD]Filter 3
[/TD]
[TD]`Gross Pay[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
just upload couple of records form sample data and it would help to find out better solution.
 
Last edited:
Upvote 0
just upload couple of records form sample data and it would help to find out better solution.

Thanks Mukeshy, let use this :
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Player (Filter 1)
[/TD]
[TD]Game Type (Filter 2)
[/TD]
[TD]Match (Filter 3)
[/TD]
[TD]Bonus
[/TD]
[TD]Gross Bonus
[/TD]
[/TR]
[TR]
[TD]Vardy
[/TD]
[TD]Champions LEague
[/TD]
[TD]Home
[/TD]
[TD]40
[/TD]
[TD]40
[/TD]
[/TR]
[TR]
[TD]Huth
[/TD]
[TD]Carling Cup
[/TD]
[TD]Away
[/TD]
[TD]70
[/TD]
[TD]110
[/TD]
[/TR]
[TR]
[TD]Fuchs
[/TD]
[TD]Champions League
[/TD]
[TD]Away
[/TD]
[TD]110
[/TD]
[TD]220
[/TD]
[/TR]
[TR]
[TD]Vardy
[/TD]
[TD]EPL
[/TD]
[TD]Home
[/TD]
[TD]50
[/TD]
[TD]270
[/TD]
[/TR]
[TR]
[TD]Fuchs
[/TD]
[TD]EPL
[/TD]
[TD]Home
[/TD]
[TD]50
[/TD]
[TD]320
[/TD]
[/TR]
[TR]
[TD]Huth
[/TD]
[TD]Champions League
[/TD]
[TD]Home
[/TD]
[TD]150
[/TD]
[TD]470
[/TD]
[/TR]
</tbody>[/TABLE]
In this table above, There are three filters (player, game type, match).. Gross Bonus is the cumulative sum of the individual player's bonuses. How can I ensure that if one, two or all filters are active, the gross bonus will response promptly for example, when the filter 1 selects only Vardy, The gross bonus is 90:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Player (Filter 1)
[/TD]
[TD]Game Type (Filter 2)
[/TD]
[TD]Match (Filter 3)
[/TD]
[TD]Bonus
[/TD]
[TD]Gross Bonus
[/TD]
[/TR]
[TR]
[TD]Vardy
[/TD]
[TD]Champions LEague
[/TD]
[TD]Home
[/TD]
[TD]40
[/TD]
[TD]40
[/TD]
[/TR]
[TR]
[TD]Vardy
[/TD]
[TD]EPL
[/TD]
[TD]Home
[/TD]
[TD]50
[/TD]
[TD]90
[/TD]
[/TR]
</tbody>[/TABLE]
Example 2: When the filter 2 selects EPL,
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Player (Filter 1)
[/TD]
[TD]Game Type (Filter 2)
[/TD]
[TD]Match (Filter 3)
[/TD]
[TD]Bonus
[/TD]
[TD]Gross Bonus
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Vardy
[/TD]
[TD]EPL
[/TD]
[TD]Home
[/TD]
[TD]50
[/TD]
[TD]50
[/TD]
[/TR]
[TR]
[TD]Fuchs
[/TD]
[TD]EPL
[/TD]
[TD]Home
[/TD]
[TD]50
[/TD]
[TD]100
[/TD]
[/TR]
</tbody>[/TABLE]
How can I achieve this?
Thanks in advance...
 
Upvote 0

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