Formula is not working

littlehelga

New Member
Joined
Jan 29, 2018
Messages
10
I'm new to excel I am using this formula

=IF(OR(J7<5, J7>5), J7, 5)

If J7 is less than 5, I want it to remain J7
If J7 is greater than 5, I want it to remain 5
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi & welcome to MrExcel
Try =IF(J7<5,J7,5)
 
Upvote 0
Welcome to the Board!

You do not want to use OR. You would just use:
Code:
=IF(J7>5,5,J7)
or even simpler:
Code:
=MIN(J7,5)
 
Upvote 0
another stumble

J1=10
J8 = 8 (formula cell)
K7 = 0 (formuia cell)
I need to add J1 and K7 and subtract J8
when i enter the formula =(J1+K7-J8) the answer is wrong...it's giving me a zero.

am i entering it wrong??
 
Upvote 0
Make sure you actually are referencing the correct cells in your formulas.
What are your formulas in J8 and K7?
Also, you are not using merged cells, are you?
 
Upvote 0
Make sure you actually are referencing the correct cells in your formulas.
What are your formulas in J8 and K7?
Also, you are not using merged cells, are you?

rechecked cells are correct for the formula


J8 is =SUM(C8:I8)
K7 is =MIN(5,J7)

No merged cells
 
Upvote 0
If the values are in the cells are really:
J1 = 10
J8 = 8
K7 = 0
Then there is no way that:
=(J1+K7-J8)
can return 0.

Are you sure that your calculation is not set to Manual?
What happens if you press F9?
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,531
Members
449,169
Latest member
mm424

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