+ Reply to Thread
Results 1 to 3 of 3

comparing number values

  1. #1
    Registered User
    Join Date
    09-13-2006
    Posts
    1

    comparing number values

    Im trying to enter a formula to compare two numbers. The first number is the reference, and I need to calculate a positive or negative difference.

    eg. 8 & 10.....diference is +2
    eg. 7 & 5.....diference is - 2

    I need the diference automatically calculated

    Thank You

    rob

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Enter ref no In A1. Second number in B1.

    Then eneter the below in C1

    =IF(B1>A1,B1-A1,B1-A1)

    VBA Noob

  3. #3
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by smallfoot
    Im trying to enter a formula to compare two numbers. The first number is the reference, and I need to calculate a positive or negative difference.

    eg. 8 & 10.....diference is +2
    eg. 7 & 5.....diference is - 2

    I need the diference automatically calculated

    Thank You

    rob
    try simply this

    =B1-A1

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1