+ Reply to Thread
Results 1 to 2 of 2

[Not an issue, just feedback] Am I being efficient with my formulas?

  1. #1
    Registered User
    Join Date
    03-27-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    20

    [Not an issue, just feedback] Am I being efficient with my formulas?

    I didn't want to post this in general because it's really not an issue. I just want to see if maybe I can improve on some formulas I just changed. Feel free to critique or ignore. sample workbook included for second one.

    Summing the trailing 12 months if it is November(not including November):

    =IF(MONTH($E$3:$CO$3)=11,SUMPRODUCT((DATE(YEAR($E$3:$CO$3),MONTH($E$3:$CO$3),1)>=(DATE(YEAR(CN$3),MONTH(CN$3)-12,1)))*(DATE(YEAR($E$3:$CO$3),MONTH($E$3:$CO$3),1)<(DATE(YEAR(CN$3),MONTH(CN$3),1)))*($E7:$CO7)*$C9),0)


    If a date is 13 months past the current month and the row is equal to a string multiply the cell by (1/(1-percentage)), then multiply by a second, and third percentage. Then subtract the number without "(1/(1-percentage))":

    =(SUMPRODUCT(((DATE(YEAR($C$5:$C$16),MONTH($C$5:$C$16)+12+1,1)>L$3)*L$5:L$16)*($A$5:$A$16=$A18)*(1/(1-$F$5:$F$16)),$G$5:$G$16,$E$5:$E$16)-SUMPRODUCT(((DATE(YEAR($C$5:$C$16),MONTH($C$5:$C$16)+12+1,1)>L$3)*L$5:L$16)*($A$5:$A$16=$A18),$G$5:$G$16,$E$5:$E$16))
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: [Not an issue, just feedback] Am I being efficient with my formulas?

    You can re-write the second formula as:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    And then, in theory, you can rationalise that to be:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Now that returns the same value, give or take a digit at the thirteenth decimal place for some values. But, if you subtract the two values, that difference disappears. So, unless you actually compare the values from the two formulae, you'd never know.

    Have a look at the updated example ...


    Regards, TMS
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. 2 formulas in one cell issue
    By Bryy2001 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-13-2012, 03:55 PM
  2. Most efficient macro to loose any formulas on whole sheet
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2011, 04:08 PM
  3. C# Issue with Existing Formulas
    By Weezy1188 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-03-2010, 12:46 AM
  4. Issue with Formulas (COMPLEX)
    By aeddipa in forum Excel General
    Replies: 2
    Last Post: 06-26-2009, 05:36 PM
  5. Efficient formulas (naming cells)
    By Vlad999 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-28-2007, 05:47 PM

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