Returning a single value based on a hierarchy list

alwayslearningVBA

New Member
Joined
Mar 24, 2021
Messages
1
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I am working on automating a fee calculator, using VBA. It needs to look at the charges made to each customer and return an amount owed by the shop according to a fee table. That's fine I do a vlookup for that. The part I'm stuck on is to evaluate if the charge is in a $100 fee category. If so, it must return only a single $10 owed for the one that is highest in the following hierarchy:

1. Removal
2. Service
3. Swap
4. Reset
5. Other

So, as an example I need help in finding a way, using VBA, to get the following result in column E "Owed:" (if it helps, I did figure out a formula in "G" to return the full name to try and group the charges by client. With this though I'm concerned what would happen if the same customer shows up twice, or customers with the same name I'd want them assessed as if they were different customers)

1616593570917.png


Thanks in advance for any help you can provide.
 

Attachments

  • 1616593097373.png
    1616593097373.png
    18.8 KB · Views: 2

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,214,826
Messages
6,121,792
Members
449,048
Latest member
greyangel23

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