Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jun 2011
    Posts
    9
    Thanks
    7
    Thanked 0 Times in 0 Posts

    variable subtraction

    Hi all
    I am working on a new project for a new client. It is quite complex but I have most of the problems sorted.
    But not all of them.
    In cell L3 is the figure 6, this is a constant and doesn't change.
    In the range L10:L14 is series of numbers these are the result of calculations in other cells.
    In the range M10:M14 is a second series of numbers and these are also the result of calculations in other cells.
    In column N we want the result eg N10=M10-L10 but if M10 is > L3 we want N10=$L$3-L10
    I have tried IF(L10>$L$3,"",M10-L10) which works if L10 is < 6.
    I have tried other formula but nothing is working.
    I have to get this right as the people who will be using this spreadsheet can barely turn the computer on. If something goes wrong it will shut the plant down until someone (probably me) gets there to fix it.
    thanks in advance
    Cliff

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Cliff,

    In column N we want the result eg N10=M10-L10 but if M10 is > L3 we want N10=$L$3-L10
    =IF($M10>$L$3,$L$3,$M10)-$L10 {Results Below}

    However, your next line: I have tried IF(L10>$L$3,"",M10-L10) which works if L10 is < 6. is inconsistent with the logic in the quote box. Which item do you want to test M10 or L10?
    Attached Images Attached Images
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Posting Permissions

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