+ Reply to Thread
Results 1 to 2 of 2

Optimizing LET Function with Multiple Variables

  1. #1
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Optimizing LET Function with Multiple Variables

    Hello,

    I?m hoping there is a more efficient (defined as less CPU intensive, fewer lines, easier to read) method of rewriting the code below. Line breaks added for readability in this forum.

    Please Login or Register  to view this content.
    The purpose of this function is to:
    1. Add up all revenue in the tblTimesheets table where the Billing Currency is CAD - and
    2. The employee is still active (transpose to tblEmployee[End Date]) ? then
    3. Multiply each month's SUM total by the end of month CAD to USD Exchange Rate (the ?K? column) - then
    4. Add a months together (represents the total revenue converted to USD)

    Note: the reason I don?t have a single CAD to USD exchange rate cell is exchange rates vary wildly throughout the year, meaning the difference between the exchange rate calculation in February and December could be millions of dollars.

    I just added the first 3 months to validate that it works, however I feel than extending the function out to 12 months (e.g., 12 separate LET variables) will slow down the calculations in the overall spreadsheet.

    Is there a more elegant or efficient way of doing this without creating a bunch of helper tables or VBA/Macros?

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Optimizing LET Function with Multiple Variables

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet complete with an explanation and some expected results.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ 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. IF function with multiple variables
    By se7en in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-13-2013, 01:45 PM
  2. Optimizing a string search function?
    By HorsePop in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-15-2013, 10:26 AM
  3. [SOLVED] Optimizing/speeding up a slow INDEX & SMALL function for retrieving multiple matches
    By lesoies in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-07-2012, 11:56 AM
  4. Function for Multiple Variables
    By leynadsvision in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-18-2008, 11:54 AM
  5. Optimizing Index / Match function
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2006, 01:23 PM
  6. Optimizing Index / Match function
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2006, 12:53 PM
  7. [SOLVED] Optimizing Index / Match function
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2006, 12:48 PM
  8. if function multiple variables
    By cin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2005, 05:05 PM

Tags for this Thread

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