# Correct value not showing

#### Turbonetics282

##### New Member
Hello,

I'm trying to get the correct value to show in my spreadsheet. It can't go over a maximum value and it can't go below a minimum value. If the calculation is between those two values, I want it to show. Here is the formula that I've come up with so far:

=IF(B25>B26,B26)+IF(B25<B27,B27)+IF(AND(B25<B26,B25),B25>B27,B25)

The formula works up until the IF(AND portion. The value it is giving is a 1. The number that it should be showing is a number between the min and max. I'm not sure if using the "IF" function is the right approach but I figured I'd ask you guys.

Any help is appreciated, thanks.

### Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

#### Turbonetics282

##### New Member
I just noticed that the formula didn't paste correctly. It is:

=IF(B25>B26,B26)+IF(B25<B27,B27)+IF(AND(B25<B26,B25),B25>B27,B25)

#### Turbonetics282

##### New Member
Not sure why it's cutting off. Let's try again.

=IF(B25>B26,B26)+IF(B25<<b27,b27) IF(AND(B25<B26,B25),B25="" +="">B27,B27)+IF(AND(B25<<b26,b25),b25>B26,B25),B25>B27,B25)</b26,b25),b25></b27,b27)>

Replies
7
Views
1K
Replies
3
Views
351
Replies
9
Views
2K
Replies
161
Views
4K
Replies
4
Views
1K

Threads
1,195,632
Messages
6,010,811
Members
441,569
Latest member
PeggyLee

### 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

### 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