+ Reply to Thread
Results 1 to 9 of 9

Sumproduct formula copied

  1. #1
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Sumproduct formula copied

    So I have this Sumproduct formula looking at sheet called ZHFM :
    Please Login or Register  to view this content.
    Now I also want to use this formula on another tab calles ZHFMLY. So I copied it and changed for all instances ZFHM to ZHFMLY :
    Please Login or Register  to view this content.
    But for some reason the new formula gives me an #N/A error, but there is data it should pick up.

    Before I changed ZHFM to ZHFMLY the copied formula gave me data, but obviously from a different sheet.
    But the data on the ZHFMLY sheet is good.

    I am not familiar with this sumproduct formula so if anybody could explain to me what is going on I would be gratefull.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Sumproduct formula copied

    The sheet name isn't the only thing that changed....

    L$5 changed to F$5

  3. #3
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Sumproduct formula copied

    Good eye Jonmo1. Unfortunately that is not the problem.
    The formula was not copied from an equal position as the target cell.
    But it is on the same line and F$5 is correct.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Sumproduct formula copied

    Can you attach a copy of the file?

  5. #5
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Sumproduct formula copied

    Well a sample.

    Its the yellow cell.

    ps: had to remove data and now #NA became #VALUE....
    Attached Files Attached Files

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Sumproduct formula copied

    In the book you posted, you missed one of the sheet names, look closely at the reference right after the INDEX function.

  7. #7
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Sumproduct formula copied

    Correct Jonmo1.
    But you can change that sheet name to ZHFMLY.
    Annoying thing is it then works....
    But I took data out of the tabs to make the workbook small enough.

    If I copy this working formula to my real workbook and then edit the link to refer to the real workbook it goes into #NA again....

    Any idea why that could be?

  8. #8
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Sumproduct formula copied

    Ok...now I somehow have solved this, but I do not get it.....
    In my examples of the formula above you see that I had a range of 2 - 10000.
    The list of total data is always variable so I chose 10000.

    Now I changed this to see what would happen to my formula which was not working anymore in ZHFMLY tab.
    I changed the range to 1000 and that worked.... The formula gave no #NA anymore.

    But more strange is the fact that the data on that sheet is more then 7400 lines long!!
    However my range was only set to 1000 and still it summed the correct amount.

    Now I can somehow explain this with the fact that the sumproduct must equal 2 variables set in the formula.
    And when you look at how many lines belong to these variables/parametes then it are only 2 lines so well within 1000 range.

    But still....why woks 10000 in sheet ZHFM and not in ZHFMLY, but 1000 will work and even sum the correct amounts even if the data on ZHFMLY is more then 7400 lines??

  9. #9
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Sumproduct formula copied

    Ok sorry for making this a monologue

    Found the problem now.
    Wondering how far I could stretch the range which would work.
    So from 1000 to 5000 to 6851....then I found that in line 6853 there was an #NA in the variables it had to chose from.....

    Logically that the formula would then return an error.
    And also I do now understand why it did work in my sample where i removed a lot of lines (including the one with the NA).

+ 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. [SOLVED] Copied formula returns 0 value
    By ECYOJ in forum Excel General
    Replies: 1
    Last Post: 11-25-2014, 11:02 PM
  2. [SOLVED] When data is copied to another workbook, hyperlinks as not copied or they don't work
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-17-2014, 06:46 AM
  3. Copying multiple worksheet so that copied hyperlinks link to new copied sheets
    By chrisjames25 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2013, 02:37 PM
  4. [SOLVED] Formula result will not show when formula is copied to another cell
    By nabraham00 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-06-2012, 01:03 PM
  5. If formula copied down
    By pauldaddyadams in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2009, 05:32 AM
  6. Add formula to copied row
    By GDS in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2009, 01:39 PM
  7. [SOLVED] Excel formula copied down
    By Pat in forum Excel General
    Replies: 4
    Last Post: 08-25-2005, 06:05 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