+ Reply to Thread
Results 1 to 2 of 2

lOOKUP -ve value

  1. #1
    Registered User
    Join Date
    08-11-2009
    Location
    glasgow, scotland
    MS-Off Ver
    Excel 2003
    Posts
    3

    lOOKUP -ve value

    Evening,

    I'd appreciate any help on the following dilema please.

    I'm in a worksheet named Accounts and I need to reference the cell in A2 and look up this reference in column A of a worksheet named Reports and return the value in column P of the owrksheet named Reports if the value is -ve.

    I have two occurences of the account reference in worksheet named Reports and I want to return the -ve value to cell N36 of worksheet Accounts and the +ve value to cell N37.

    Hope this makes some sense, any help appreciated.

    Thanks

    JH
    Last edited by JackH123; 09-02-2009 at 08:06 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: lOOKUP -ve value

    if you only have 2 occurances of any account ref in one column and the corresponding values are one -ve and one +ve(or zero) you can do it like this
    =SUMPRODUCT((reports!$a$1:$a$100=$A$2)*(reports!$p$1:$p1$100>=0),(reports!$p$1:$p1$100)) for +ve

    =SUMPRODUCT((reports!$a$1:$a$100=$A$2)*(reports!$p$1:$p1$100<0),(reports!$p$1:$p1$100)) for -ve
    then again if you had the same account say 4 times with 2 +ve and 2-ve it would give the total of +ve and the total of the -ve's
    Last edited by martindwilson; 09-02-2009 at 08:49 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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