Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jonathan
 
Posts: n/a
Default How do I define the signum function sign(x) in Excel?

I am trying to define the function sign(x) in Excel. Sign (x) = 1 if x0,
sign(x)=0 if x<0 and sign(0)=0. I know that it is probably straightforward to
do as an if statement, but I wondered if there is just an explicit function
in Excel that would do it for me.
  #2   Report Post  
Jazzer
 
Posts: n/a
Default


Hi,

You could try something like this:

=MAX(SIGN(A1),0)

so that your number is in A1.

- Asser


--
Jazzer
------------------------------------------------------------------------
Jazzer's Profile: http://www.excelforum.com/member.php...fo&userid=4464
View this thread: http://www.excelforum.com/showthread...hreadid=276583

  #3   Report Post  
Tushar Mehta
 
Posts: n/a
Default

Do you really mean sign(x)=0 if x<0? If not (and you meant sign(x)=-1
if x<0), then check XL help for the SIGN function.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I am trying to define the function sign(x) in Excel. Sign (x) = 1 if x0,
sign(x)=0 if x<0 and sign(0)=0. I know that it is probably straightforward to
do as an if statement, but I wondered if there is just an explicit function
in Excel that would do it for me.

  #4   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Jonathan,

=IF(x0,1,0)

HTH,
Bernie
MS Excel MVP

"Jonathan" wrote in message
...
I am trying to define the function sign(x) in Excel. Sign (x) = 1 if x0,
sign(x)=0 if x<0 and sign(0)=0. I know that it is probably straightforward

to
do as an if statement, but I wondered if there is just an explicit

function
in Excel that would do it for me.



  #5   Report Post  
Bernd
 
Posts: n/a
Default

The sign function is in Excel, but you defined something
like:
=--(A10)


Regards,
Bernd
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Access Module coded converted to Excel Function Adam Excel Discussion (Misc queries) 1 December 23rd 04 02:48 PM
Excel function help facilities RPS Excel Discussion (Misc queries) 1 December 8th 04 02:36 AM
I cant use englisch function names in a swedich version of excel PE Excel Discussion (Misc queries) 2 December 7th 04 01:00 AM
Statistical Excel Function Question within Excel 2000... Drew H Excel Worksheet Functions 3 October 31st 04 06:55 PM


All times are GMT +1. The time now is 02:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"