+ Reply to Thread
Results 1 to 8 of 8

Using Fromulas for cell references in the Sum() Function

  1. #1
    Registered User
    Join Date
    10-26-2019
    Location
    Draper, UT
    MS-Off Ver
    365
    Posts
    5

    Using Fromulas for cell references in the Sum() Function

    I have two lookup formulas that return cell references that I'd like to use in a Sum() function, but it doesn't work.

    The formulas are:
    =ADDRESS(MATCH(J5,DailyGrowthTable[Date],0)+11,3) which returns $C$822
    and
    =ADDRESS(MATCH(LOOKUP(2,1/(DateColumn<>""),DateColumn),DailyGrowthTable[Date],0)+11,3) which returns $C$1246

    If I use =SUM($C$822:$C$1246) it works and returns 12,496 which is correct.

    But if I replace the cell references in the Sum() function with the formulas, it doesn't work

    =SUM(ADDRESS(MATCH(J5,DailyGrowthTable[Date],0)+11,3):ADDRESS(MATCH(LOOKUP(2,1/(DateColumn<>""),DateColumn),DailyGrowthTable[Date],0)+11,3)) returns #N/A.
    Attached Files Attached Files
    Last edited by RinBarrett; 10-26-2019 at 01:32 PM. Reason: Replace Image with sample.xlsx

  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
    43,891

    Re: Using Fromulas for cell references in the Sum() Function

    That looks overly complicated!!

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please DO NOT attach a picture of an Excel sheet (I do not have the patience to re-type any/all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. For example, don't show text in a column if it's really a number. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually). To be honest, I am not interested in seeing a non-working formula... or a pile of blank cells. However, I am very interested in seeing your EXPECTED results in their EXPECTED location.

    4. Try not to use merged cells. They cause lots of problems and are DEFINITELY best avoided!

    Unfortunately the attachment icon doesn't work at the moment. So,... instead click on Go Advanced (below the Edit Window) while composing your reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.
    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

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,802

    Re: Using Fromulas for cell references in the Sum() Function

    What you are describing ("reference as result of formula") is basically the INDIRECT() function: https://support.office.com/en-us/art...1-92b6306fa261, but I agree with Glenn, that this approach feels overly complicated. Reading between the lines, it looks like you are trying to sum values between dates or after a specified date, and that is probably easier to do as a SUMIFS() function: https://support.office.com/en-us/art...6-611cebce642b
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,345

    Re: Using Fromulas for cell references in the Sum() Function

    You were asked to provide a sample workbook, not a picture of it. Please attach the .xlsx file.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    10-26-2019
    Location
    Draper, UT
    MS-Off Ver
    365
    Posts
    5

    Re: Using Fromulas for cell references in the Sum() Function

    AliGW - done, thanks.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,027

    Re: Using Fromulas for cell references in the Sum() Function

    Maybe missing something, but why not just use
    =SUMIF(DateColumn,">="&B3,DailyGrowthTable[Deposit or Withdrawal])

  7. #7
    Registered User
    Join Date
    10-26-2019
    Location
    Draper, UT
    MS-Off Ver
    365
    Posts
    5

    Re: Using Fromulas for cell references in the Sum() Function

    That's the thing I was looking for. Thanks so much for your help!

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,027

    Re: Using Fromulas for cell references in the Sum() Function

    You're welcome & thanks for the feedback

+ 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. Entering cell references to MAX function
    By helloc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-17-2017, 10:26 AM
  2. VBA for excel fromulas
    By Coldsteel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2014, 03:46 PM
  3. [SOLVED] Feeding in a function (mixing plain text and cell references) from VBA to a Cell
    By JamesAB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2012, 05:54 AM
  4. Replies: 9
    Last Post: 03-03-2009, 06:07 AM
  5. [SOLVED] How to change the case in mS excel without using fromulas
    By all4excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-14-2007, 04:32 AM
  6. [SOLVED] Time measurements fromulas?
    By Todd W. in forum Excel General
    Replies: 2
    Last Post: 11-21-2005, 09:20 PM
  7. [SOLVED] removing zeros from fromulas in excel
    By elarscott in forum Excel General
    Replies: 3
    Last Post: 09-03-2005, 12: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