+ Reply to Thread
Results 1 to 3 of 3

Adding cell values via a function results in #VALUE!

  1. #1
    Registered User
    Join Date
    02-19-2014
    Location
    York, England
    MS-Off Ver
    Excel 2003, 2007 & 2010
    Posts
    2

    Adding cell values via a function results in #VALUE!

    Hello all and thanks for helping and reading my first post

    I'm using Excel 2010.

    I have a workbook with quite a few sheets on it so to simplify my problem I'll concentrate on just two worksheets, one called Ackroyds and the other Supplier Details.

    What I'm doing is a simple invoice spreadsheet where on the Ackroyds sheet I input the invoice information and it lets me know when that invoice needs paying by highlighting it red. All working great.

    On the supplier page I have a list of all the companies I deal with and one of the columns is Total Due Now. In this column I want it to look at the list of invoices for that supplier (in this example Ackroyds) and add up all the ones that are red so I can see the total amount due now (some companies give us 30 days to pay so wouldn't be included if still in grace period) to that company. Having battled with trying to loop through the cells in the column to see if they were red and discovering that reading the colour of conditional formatted cells is pretty much impossible, I have it checking the same formula used in the conditional formatting rules....again...all working great.

    This is my function

    Please Login or Register  to view this content.
    and I call it using

    Please Login or Register  to view this content.
    So it loops through the range of dates to check if the invoice is due in the next 3 days. If it is I want it to add it to the variable tmpAmnt....this is where it errors. If I have the line
    Please Login or Register  to view this content.
    set to
    Please Login or Register  to view this content.
    then it correctly fills the cell with the last value of the range. It's only when I try to add them up I get the #VALUE! error.

    Any takers to this problem?

    Many thanks

    Dave

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Adding cell values via a function results in #VALUE!

    Try this...

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    02-19-2014
    Location
    York, England
    MS-Off Ver
    Excel 2003, 2007 & 2010
    Posts
    2

    Re: Adding cell values via a function results in #VALUE!

    Thanks for the reply but that didn't fix the problem.

    I've solved it though. It was caused by me trying to add up a range and not a single cell value.

    Here is the modified code:
    Please Login or Register  to view this content.
    Thanks again

+ 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] function that returns interest with different values depending previous cell's results
    By managingcrap in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-09-2013, 03:15 AM
  2. Need Cell pre-filled before adding results to it.
    By creekboy in forum Excel General
    Replies: 2
    Last Post: 02-25-2013, 01:54 PM
  3. Need help in adding IF function results
    By Khaldon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-06-2011, 03:53 AM
  4. Need help in adding part of IF function results
    By Khaldon in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-04-2011, 01:42 PM
  5. Generating function results depending on text values.
    By DorothyFan1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-02-2011, 09:07 AM

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