IF condition

churmie

New Member
Joined
Jan 9, 2014
Messages
44
I need help with what should be easy formula but I can't get it right. I have the following figures:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]2[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]10[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]

The average is 2, but I have a separate Formula which is a minimum of 2.5. How do I replace the zero values with whichever is higher of the average or the minimum?

thanks!
 
Last edited by a moderator:

Book1
CDEFGHIMNOPQRSTUV
1MonTueWedThuFriSatSunMin StockAverageMonTueWedThuFriSatSun
2220010002.54.7224.74.7104.74.7
Sheet1
Cell Formulas
RangeFormula
N2=AVERAGEIF(C2:I2,">0",C2:I2)
P2=IF(C2=0,MAX($N$2,$M$2),C2)
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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