# Possible If/Then formula? Calculate between 2 numbers

#### kittymongo

##### New Member
Does anyone know how to calculate between 2 numbers. Example -

one report has to pay accurately which is between 95%-102% (we count these as accurate). another report has to pay the same way (these 2 never match since they pull from different sources). I need a formula to show if these 2 calculate within the same data range. i have a formula in there but it is just stating if the 2 reports match per line but i am getting false matches since it is matching everything out of range as well.

report 1
cell a1 = 30% accurate
cell a2 = 98% accurate
cell a3 = 100% accurate
cell a4 = 94% accurate
cell a5 = 99% accurate

report 2
cell a1 = 30% accurate
cell a2 = 100% accurate
cell a3 = 100% accurate
cell a4 = 22% accurate
cell a5 = 91% accurate

what sort of formula can be used to show both reports are within the accurate threshold range by line?

i hope this makes sense. if not, let me know and i will try to clarify more.

Thank you so much!

#### dreid1011

##### Well-known Member
Based on your sample, what should the results be line by line?

#### kittymongo

##### New Member
report 1
cell a1 = 30% accurate
cell a2 = 98% accurate
cell a3 = 100% accurate
cell a4 = 94% accurate
cell a5 = 99% accurate

report 2
cell b1 = 30% accurate
cell b2 = 100% accurate
cell b3 = 100% accurate
cell b4 = 22% accurate
cell b5 = 91% accurate

What formula can i use in cell c1, c2, c3, etc (it is a line by line calculation) to show if both reports are displaying between 95%-102% range?

#### dreid1011

##### Well-known Member
Is this what you expect to see?

 30% 30% Out of Range 98% 100% In Range 100% 100% In Range 94% 22% Out of Range 99% 91% Out of Range

<tbody>
</tbody>

#### petertenthije

##### Board Regular
=and(and(\$a1>=0.95;\$a1<=1.02),and(\$b1>=0.95,\$b1<=1.02))

#### kittymongo

##### New Member
Yes, this is what I want to see. What formula can I use to get this result? Pretty Please

Is this what you expect to see?

 30% 30% Out of Range 98% 100% In Range 100% 100% In Range 94% 22% Out of Range 99% 91% Out of Range

<tbody>
</tbody>

#### dreid1011

##### Well-known Member
Building from petertenthije's formula, try this:

=IF(and(\$a1>=0.95;\$a1<=1.02,\$b1>=0.95,\$b1<=1.02),"In Range","Out of Range")

#### kittymongo

##### New Member
Perfect! Thank you so much! This worked like a charm and is exactly what I am looking for.

You're welcome.

Threads
1,082,151
Messages
5,363,430
Members
400,736
Latest member
Aida

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
• Listbox Header
Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
• Complex Heat Map using conditional formatting
Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
• Conditional formatting
Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...