Adding cells to a maximum amount of?

roc_ent

Active Member
Joined
Jan 27, 2003
Messages
252
Office Version
  1. 2019
Platform
  1. Windows
I am creating an expense sheet, and when it comes to meals, some claim what they actually paid and others claim the per diem amount.

I'm having a hard time to figure out how to use the max function to give me the actual amount spent or the per diem but not going over $40.00

Here is how its set up

Cells: F22 is breakfast F23 is Lunch and F24 is dinner. These cells would be the actual amount spent on each meal and returns the total in cell M22. However, my maximum amount that can be paid out is $40.00 so example is 8.00+16.00+20.00 M22 would return 44.00 but I want it to maximize the cell amount to $40.00.

How can I write the formula for this?

Thanks in advance.

Bob
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Thanks Eric, not certain why this was creating such a problem for me, must be the Canadian long weekend effect. lol Thanks again.
 
Upvote 0
It's a pretty simple formula, but a lot of people tend to mix up MAX and MIN for some reason. I always double check when I use them. Glad we could help. :)
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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