+ Reply to Thread
Results 1 to 16 of 16

#VALUE! error in formula

  1. #1
    Registered User
    Join Date
    11-08-2013
    Location
    alberta, canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Unhappy #VALUE! error in formula

    I have a formula that looks like this:

    =sumbycolor(S331,T330:AG330)

    for which I keep getting a #VALUE! error.

    I am asking it to add up the contents of cells following, the content of the cells following is determined this way:

    =IF(AND(SUM(T326:T329)<=$B344,SUM(T326:T329)>0),$B344-SUM(T326:T329),IF(SUM(T326:T329)>$B344,"",IF(SUM(T326:T329)<1,"")))

    I do the color change manually for amounts that I need to show as a separate project.

    I think I am getting the error because I have text in the cells I am trying to add up?

    I think I am probably doing this the most difficult way possible, and I think this is driving me crazy.

    Thanks.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: #VALUE! error in formula

    sumbycolor() is not a native excel function do you have an add in? or udf
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    11-08-2013
    Location
    alberta, canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: #VALUE! error in formula

    I think it was a vba I found online.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: #VALUE! error in formula

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  5. #5
    Registered User
    Join Date
    11-08-2013
    Location
    alberta, canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: #VALUE! error in formula

    Excel Forum Submission.xlsm

    I have attached a sample of the spreadsheet. If it asks for a password - RedBull.

    What I am trying to do is create this spreadsheet to record and track data for payroll, and the remaining data will feed to a second spreadsheet which is then submitted for processing. The sumbycolor part is to track $ in the next province for WCB.

    EJ

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: #VALUE! error in formula

    yep you are right if there is any text you get value error
    use the function from here instead it ignores text
    http://www.extendoffice.com/document...-color.html#a1
    use as
    Count the colored cells: =colorfunction(A,B:C,FALSE)

    Sum the colored cells: =colorfunction(A,B:C,TRUE)

  7. #7
    Registered User
    Join Date
    11-08-2013
    Location
    alberta, canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: #VALUE! error in formula

    You are a genius.

    Thank you.

    I would like to say that I have it all figured out and I won't be back with any more questions but I probably will

  8. #8
    Registered User
    Join Date
    11-08-2013
    Location
    alberta, canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: #VALUE! error in formula

    I have one more question on this one. It doesn't recalculate automatically. With the sumbycolor I hit F9 and the sheet recalculated - is there an equivalent here. If I color my cells, the result does not change unless I paste the formula over a second time.

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: #VALUE! error in formula

    try adding
    Please Login or Register  to view this content.
    to the code
    Please Login or Register  to view this content.

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: #VALUE! error in formula

    Quote Originally Posted by Ejward View Post
    It doesn't recalculate automatically.
    That's why you should avoid basing calculations on cell formats.

    Most people don't know that's how it works when they set out to do it.

    You can make the function volatile but it still won't work the way you want it to work. You can change the format but the function won't recalculate until some other event causes a calculation or you do a manual calculation.
    Last edited by Tony Valko; 11-29-2013 at 10:16 PM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: #VALUE! error in formula

    op did say
    With the sumbycolor I hit F9 and the sheet recalculated

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: #VALUE! error in formula

    Better off using a formula based on WHY the cells are formatted a certain way.

    If that's not possible then introduce an additional column that identifies the cells that meet the condition and use this new column as the source for the calculation.

  13. #13
    Registered User
    Join Date
    11-08-2013
    Location
    alberta, canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: #VALUE! error in formula

    [QUOTE=Tony Valko;3494396]

    Most people don't know that's how it works when they set out to do it.

    /QUOTE]

    Yes, that would be me I am mostly self taught and can't get into the course I want until February, and that will be too late for this project. For now I will just continue to use the paste every time I change the cell color.

  14. #14
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: #VALUE! error in formula

    the line i told you to add will make it recalculate with f9

  15. #15
    Registered User
    Join Date
    11-08-2013
    Location
    alberta, canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: #VALUE! error in formula

    And so it does, thanks.

  16. #16
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: #VALUE! error in formula

    That was ALL OF US at one time or another.

    The more we use Excel the more we realize how much we don't know about it!

    Good luck!

+ 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] Inputbox error message. Formula you typed contains an error.
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-09-2013, 02:25 PM
  2. Formula Error-Error Message
    By Paige in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2006, 04:15 PM
  3. Replies: 4
    Last Post: 03-24-2006, 07:20 AM
  4. Error values:DIV/0! error in SumProduct formula with no division
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 PM
  5. [SOLVED] Formula error with Mac resulting in '#NAME' error
    By Linking to specific cells in pivot table in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2005, 03:05 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