Min / Max of a cell

used2reg

New Member
Joined
Mar 2, 2012
Messages
28
I have a an excel sheet where I need to get the MIN/MAX of a cell and refrence it to another cell

I have "3" in a cell and when i Reference this cell i would like for it to return a 3, but if i have a 8 in the cell I would like to return a 4


So lets say (the A1 and A2 cells are a calculated field)

A1 = 3
A2 = 8

I would like to see

C1 = 3
C2 - 4



hope i left enough details..
 
Last edited:

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
What is the logic behind what you are trying to do?
 
Upvote 0
Assuming 4 is always the highest number you want

In cell C1 use the formula
=MIN(A1,4)
and copy down
 
Upvote 0
What is the logic behind what you are trying to do?
I am creating a sheet for billing; we charge by the # of people (A1, A2) that attend; but can only bill for 4 (Max); but need to charge 3 when only 3 attend
 
Upvote 0
Check that your numbers are proper numbers, as that does work
+Fluff 1.xlsm
ABC
1
211
322
433
544
654
Data
Cell Formulas
RangeFormula
C2:C6C2=MIN(A2,4)
 
Upvote 0
Is the 'field' formatted as a text?

See if this works

=MIN(--A1,4)
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,054
Latest member
juliecooper255

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