Results 1 to 4 of 4

Thread: Excel Formulas

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Excel Formulas

    I've got a spreadsheet from a person who isn't with the company anymore but the formulas are not behaving

    Both screenshots contain the same formula (except for search phrase) but you'll notice the second 1 contains { } (start and end of formula). Screenshot 1 which doesn't contain { } doesn't display any results where as the formula surrounded by { } does.

    Does anyone know how { } are automatically added to the start and end of a formula and why if the formula doesn't include them no result is displayed?
    Attached Images Attached Images   

  2. #2

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Resolved Re: Excel Formulas

    I don't know why {} around the formula works but found out how to add them.

    When creating your array formula, you need to use Ctrl+Shift+Enter instead of Enter. This creates {} brackets around your formula as follows:

  3. #3
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Excel Formulas

    Help> MS Excel help
    Enter : array formula
    Search it - read up on Create Array formula

    Seems to do multiple calculations the way they should be without making lots of cells with functions.



    Or just to confuse people with something they haven't used before.


    Or here too

    * Note: Pressing the Ctrl+Shift+enter only appears to work on entering the formula on the first attempt...

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  4. #4
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: Excel Formulas

    The person who wrote that array formula may have a good skill in Excel.
    Array fomula is a very powerful way to calculate large and multiple range in Excel.

    * Without knowing array formula, one may have to fill an extra column, let say M, in sheet Details from M2 to M11741, start at M2 with:
    =IF(AND($G2="WCB1",$E2="Low",$L2>0),$L2,0)
    or
    =($G2="WCB1")*($E2="Low")*($L2>0)*$L2
    then fill down to M11741
    In other sheet, the equivalent formula should be:
    =SUM(Details!$M$2:$M$11741)*100/C6

    * The array formula
    {=SUM((Details!$G$2:$G$11741="WCB1")*(Details!$E$2:$E$11741="Low")*(Details!$L$2:$L$11741>0)*Details !$L$2:$L$11741)*100/C6}
    means
    =(Details!$G2="WCB1")*(Details!$E2="Low")*(Details!$L2>0)*Details!$L2 + (Details!$G3="WCB1")*(Details!$E3="Low")*(Details!$L3>0)*Details!$L3 + ... + (Details!$G11741="WCB1")*(Details!$E11741="Low")*(Details!$L11741>0)*Details!$L11741
    Of course you have no way to write this sum with 11740 terms.

    * The above array formula can be written as a normal formula as below (for this case only):
    =SUMPRODUCT((Details!$G$2:$G$11741="WCB1")*(Details!$E$2:$E$11741="Low")*(Details!$L$2:$L$11741>0)*( Details!$L$2:$L$11741))*100/C6

    Quote Originally Posted by Ecniv
    * Note: Pressing the Ctrl+Shift+enter only appears to work on entering the formula on the first attempt...
    That is not true. To create an Array Formula, we cannot enter { } directly but we need to use Ctrl+Shift+Enter in Edit mode.
    Ctrl+Shift+Enter will always work but you need to get in Edit mode first (double click the cell or select the cell then press F2).
    Last edited by anhn; May 16th, 2008 at 07:48 AM.
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

Posting Permissions

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



Click Here to Expand Forum to Full Width