Help with a #NUM! error please

msampson

Board Regular
Joined
Mar 9, 2004
Messages
129
Office Version
  1. 365
Platform
  1. MacOS
I have a dataset with a variety of values. One of them is an integer T that also happens to be in column T. I have an equation that will switch between two options based on the value of T. It's easy to do with an if statement, but I want to build it into this equation so that it can easily be ported to other systems that won't be able to use conditional formulas.

This is the equation

=1/(1+(EXP(10*(T2-400))))

For values of T < 400 the equation returns the value of 1. For values of exactly 400 the equation returns the value of 0.5. For values of T > 400 the equation returns the value of 0.

It works fine until I get to 471 (These values will extend from 5-3000). For 470 I get a 0 but for every number greater than that I get a value of #NUM !

Any ideas?
thanks, Maureen
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
=1/(1+(EXP(10*(T2-400))))
For values of T < 400 the equation returns the value of 1. For values of exactly 400 the equation returns the value of 0.5. For values of T > 400 the equation returns the value of 0.

Not really. Up to 396 does indeed return 1.

For 397 to 399, it returns 0.999999999999907 to 0.999954602131298.

For 400, it does indeed return exactly 0.5.

But for 401 to 470, it returns 0.0000453978687024344 to 9.85967654375977E-305, not exactly zero.

For 470 I get a 0 but for every number greater than that I get a value of #NUM !

For 470, EXP returns 1.014232054735E+304.

For 471, EXP exceeds the internal 64-bit binary floating-point calculation limit of about 1.79769313486232E+308 (exactly 10*1.79769313486231E+307 + 5.79E+293).

The largest value of T2 is 470.978271289338.

Why not IF(T2<400, 1, IF(T2=400, 0.5, 0)) ? Or (T2<400)+(T2=400)*0.5 ?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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