+ Reply to Thread
Results 1 to 5 of 5

value error

  1. #1
    Registered User
    Join Date
    03-09-2017
    Location
    Macau
    MS-Off Ver
    2007
    Posts
    7

    value error

    Hi all,
    please assist with this:

    =IF(A1:A10="",B13*E1,B13*E2) i get a value of 375

    =IF(A2:A12="",B13*E1,B13*E2) i get a value error


    the is no space and text into any of the cell.

    Thanks
    reggieneo

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: value error

    reggieneo,
    Those are array formulas.
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    What is in B13, E1:E2?

    If you click in the formula bar and hit the F9 function key you will see an array of the form {0;0;0;0;0;0;0;0;0;0}. Your answers will be in the place of the 0s.

    Did this help?
    Last edited by FlameRetired; 06-20-2017 at 11:00 PM.
    Dave

  3. #3
    Registered User
    Join Date
    03-09-2017
    Location
    Macau
    MS-Off Ver
    2007
    Posts
    7

    Re: value error

    Thanks Dave. It is working well.

  4. #4
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: value error

    Quote Originally Posted by reggieneo View Post
    =IF(A1:A10="",B13*E1,B13*E2) i get a value of 375
    =IF(A2:A12="",B13*E1,B13*E2) i get a value error
    It is unclear what your intent is. But you probably do not want to simply array-enter the formula as-is (press ctrl+shift+Enter instead of just Enter).

    As written, if you simply press Enter, the formula is interpreted as IF(An="",...), where n is the row number where the formula is entered. If you enter the formula in row 1, the first formula will work by coincidence, but the second formula returns #VALUE because the row number is not 2 through 12.

    Although the #VALUE error is avoided if you array-enter the formula, the interpretation and intent is unclear. Arguably, one of the following might reflect your intention; but I doubt it.

    { =IF(AND(A2:A12=""),B13*E1,B13*E2) }

    or
    { =IF(OR(A2:A12=""),B13*E1,B13*E2) }


    The curly braces in red indicate that we pressed ctrl+shift+Enter instead of just Enter. We cannot type the curly braces directly.

    The first formula returns B13*E1 if all of A2:A12 are empty or the null string.

    The second formula returns B13*E1 if at least one of A2:A12 is empty or the null string.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: value error

    @ joeu2004

    Quite correct. My bad. It doesn't have to be array entered. In fact I could not duplicate the error either way after posting.

+ 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. VBA ERROR: run time error 1004: Application-defined or Object-defined error in excel 2013
    By AnanthKrishna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2015, 06:16 AM
  2. [SOLVED] Run-tim error -2147467259(80004005): Automation error Unspecidied error
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2014, 12:12 PM
  3. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  4. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  5. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  6. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  7. Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 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