Greater Than Less Than

Beachfan

New Member
Joined
Feb 10, 2021
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
Hi all, I am needing cell I31 to look at cell G28 and see if it is greater than 80 but less than 86 and if so by how many. I have been racking my brain trying to figure this one out and any help would be greatly appreciated. Capture0.PNG
Capture0.PNG
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi & welcome to MrExcel.
It's not entirely clear what you are after but maybe
Excel Formula:
=IF(AND(G28>=80,G28<=86),G28-80,"??")
You didn't say what should happen if G28 is outside the range.
 
Upvote 0
Welcome to the Board!

Is this what you are looking for?
Excel Formula:
=IF(AND(G28>80,G28<86),86-G28,"")
 
Upvote 0
Hi Beachfan,

You don't show column/row and you don't say what to do if the number is not in the range so I hope this helps:

Beachfan.xlsx
FG
3842
493 
52 
6815
Sheet1
Cell Formulas
RangeFormula
G3:G6G3=IF(AND(F3>80,F3<86),86-F3,"")
 
Upvote 0
Note that your question was a little ambiguous, and Fluff and I interpretted differently:
I am needing cell I31 to look at cell G28 and see if it is greater than 80 but less than 86 and if so by how many
"by how many"
- Fluff interpretted as how many more than 80
- I interpretted it as how many less than 86

It isn't obvious from the way you worded the question, but you have a solution for both possibilities.
 
Upvote 0
Sorry if I was unclear. If cell G28 is over 80 but under 86 I need to know by how much, but not to go over 86. If it is under 80 then do nothing. Does that help more?
 
Upvote 0
Does that help more?
Fraid not.
Can you post some examples showing expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Sorry if I was unclear. If cell G28 is over 80 but under 86 I need to know by how much, but not to go over 86. If it is under 80 then do nothing. Does that help more?
I think Fluff's original answer should give you that. Just replace the "??" with "".
Excel Formula:
=IF(AND(G28>=80,G28<=86),G28-80,"")
 
Upvote 0
Being on a government computer system I am not able to download anything so that would not be an option. sorry, when i plugged that in it just gave me a blank even though G28 is over 80 and less than 86
Capture1.PNG
 
Upvote 0
G28 is 93, which does not meet the criteria you gave of being between 80 and 86.
You said that if it was not between 80 and 86, then do nothing.

Did you really mean anything greater than 80, but cap it off at 6 (86-80)?
If so, try this:
Excel Formula:
=IF(G28>80,MIN(G28-80,6),"")
 
Upvote 0
Solution

Forum statistics

Threads
1,214,913
Messages
6,122,207
Members
449,074
Latest member
cancansova

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