I think its a nested IF?

Jimmy110

Board Regular
Joined
Feb 28, 2022
Messages
63
Office Version
  1. 365
Platform
  1. Windows
Hi all,

hoping someone can help me with the correct IF formula???

Basically, C9 is the average of my measurement readings, E9 is a dynamic target that instructs the user what the next measurement should be to pull the average back towards the target.

So if I have a target of 15, and C9 is displaying the average of all the readings so far.... what I'm trying to do is the further away from the target C9 is, the greater the correction would be in the "Dynamic Target" cell which is E9.

I guess explained verbally, it would sound like this;

If Cell C9 is between 15 and 15.05 then Cell E9 would return 15. However if Cell C9 is between 15.05 and 15.15, Cell E9 would return 14.9. Also if C9 is more than 15.15, E9 would return 14.7.

Then the same the opposite way....if C9 was between 14.9 and 15, E9 would return 15.1 and if C9 is less than 14.9, E9 would return 15.3.

I just need some help to make that a formula lol

thanks

James
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
This in Cell E9:

Excel Formula:
=IF(AND(C9>=15,C9<=15.05),15,IF(AND(C9>=15.05,C9<=15.15),14.9,IF(C9>15.15,14.7,IF(AND(C9>=14.9,C9<=15),15.1,IF(C9<14.9,15.3,)))))
 
Upvote 0
This in Cell E9:

Excel Formula:
=IF(AND(C9>=15,C9<=15.05),15,IF(AND(C9>=15.05,C9<=15.15),14.9,IF(C9>15.15,14.7,IF(AND(C9>=14.9,C9<=15),15.1,IF(C9<14.9,15.3,)))))
Thank you so much igold.....you have saved me soooo much time and heartache lol
 
Upvote 0
You are welcome, I was happy to help. Thanks for the feedback!
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,388
Members
448,957
Latest member
Hat4Life

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