+ Reply to Thread
Results 1 to 5 of 5

Thread: Excel query - Represent negative values

  1. #1
    Registered User
    Join Date
    08-10-2011
    Location
    Centurion, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    1

    Excel query - Represent negative values

    In the attached spreadsheet I get negative values in the answer, how can this be represented

    How do I do this if the values in column B are lower than the values in columnA

    Regards
    Siva
    Attached Files Attached Files

  2. #2
    Forum Guru sweep's Avatar
    Join Date
    04-03-2007
    Location
    Location: Location:
    MS-Off Ver
    3.0
    Posts
    2,472

    Re: Excel query - Represent negative values

    Hi,

    How about this in C2 and copied down?

    =IF(B2-A2<0,"-"&TEXT(ABS(B2-A2),"hh:mm"),B2-A2)
    Please disregard anything in the above post. It may well have been edited without my consent, as has been the case with several posts and threads recently.

  3. #3
    Registered User
    Join Date
    05-13-2011
    Location
    New Zealander in London
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Excel query - Represent negative values

    Um, I'm not 100% sure this gives the correct result (mathmatically) that you're after, but I've got it displaying right.
    =IF(B6-A6<0,TEXT(A6-B6,"-h:mm"),B6-A6)

  4. #4
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,637

    Re: Excel query - Represent negative values

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  5. #5
    Forum Guru sweep's Avatar
    Join Date
    04-03-2007
    Location
    Location: Location:
    MS-Off Ver
    3.0
    Posts
    2,472

    Re: Excel query - Represent negative values

    @ tarquinious

    Thanks. Silly mistake!
    Please disregard anything in the above post. It may well have been edited without my consent, as has been the case with several posts and threads recently.

+ 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.2.0