Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Posts
    25

    Unanswered: Question regarding INDRIECT function

    Hello All,

    I am building a report in which I have started to get familiar with the INDIRECT funtion. Was not having much trouble with it until I ran into the following formula:

    =SUM(IF('SAL Adjusted'!$AN$3:$AN$314<'SAL Adjusted'!$AP$3:$AP$314,1,0)

    I tried to apply the same syntax that I had applied to the other lines of formula that worked but the following quickly produces an error:

    =SUM(IF(INDIRECT("'SAL Adjusted'!$AN$3:$AN$314")<(INDIRECT("'SAL Adjusted'!$AP$3:$AP$314"),1,0)))

    Im sure my syntax is off somewhere, but not sure where exactly. Have tried a few different placements of the end quote and parenthesis, but have not gotten the above formula to work. Any help would be greatly appreciated!

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi,

    You got your brackets a bit muddled up; this formula is (of course) an array formula so must be completed with CTRL+SHIFT+ENTER:
    Code:
    =SUM(IF(INDIRECT("'SAL Adjusted'!$AN$3:$AN$314")
        <INDIRECT("'SAL Adjusted'!$AP$3:$AP$314"),1,0))
    You might prefer the SUMPRODUCT() equivalent which doesn't need to be CTRL+SHIFT+ENTER'd:
    Code:
    =SUMPRODUCT(--(INDIRECT("'SAL Adjusted'!$AN$3:$AN$314")
        <INDIRECT("'SAL Adjusted'!$AP$3:$AP$314")))

  3. #3
    Join Date
    Mar 2005
    Posts
    25
    Colin...once again, you are the man!

Posting Permissions

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