+ Reply to Thread
Results 1 to 8 of 8

Formula error

  1. #1
    Registered User
    Join Date
    10-21-2014
    Location
    Mexico, Mexico
    MS-Off Ver
    Office 2010
    Posts
    5

    Formula error

    Hi guys, I have a quick question:

    When I use this formula: =IF([[TIPO ]]="DEPOSITO",TEXT(ROW(C1),"C - 000"),"NULL") there's no problem, but when I change the letter C in "C - 000" for D, =IF([[TIPO ]]="DEPOSITO",TEXT(ROW(C1),"D - 000"),"NULL") I get a #Value! Error

    Any Help?
    Last edited by adalbertobf; 06-21-2016 at 11:42 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Formula error

    Hi, welcome to teh forum

    Hard tio say what the problem might be without seeing a sample of what you are working with. I suggest that you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-21-2014
    Location
    Mexico, Mexico
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: Formula error

    Hi! Thank for the quick response admin! Attachment uploaded. Thank you!
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Formula error

    Hello adalbertobf,

    Welcome to the forum

    If you only want to change the Letter part, change your formula to this instead

    C3:
    Please Login or Register  to view this content.
    And you can change "D" to "C" or "E" or even "Today is a great day (maybe)" and it should run just fine.

    idk why the "C - 000" actually works as a text_format, it'd be great if someone can explain that too xd
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Formula error

    Interesting...
    =TEXT(ROW(C1),"C - 000")
    works but
    =TEXT(ROW(C1),"D - 000")
    does not.

    I will push this out to the other experts to see if they know why

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,987

    Re: Formula error

    Because D is one of the built-in formatting codes (for Day). You need to escape it either with a backslash or quotes:
    =TEXT(ROW(C1),"\D - 000")
    or:
    =TEXT(ROW(C1),"""D"" - 000")

  7. #7
    Registered User
    Join Date
    10-21-2014
    Location
    Mexico, Mexico
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: Formula error

    This works to perfection! Thank you Rorya!

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Formula error

    Good to know, Rory, thanks for the assist

+ 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. Replies: 1
    Last Post: 03-12-2014, 12:42 PM
  2. [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
  3. Excel 2007 : Formula error:bring up an #VALUE! Error.
    By burner007 in forum Excel General
    Replies: 3
    Last Post: 06-20-2011, 06:10 AM
  4. Formula Error-Error Message
    By Paige in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2006, 04:15 PM
  5. Formula expected end of statement error, typing formula into cell as part of VBA macro
    By DavidGMullins@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2006, 03:05 PM
  6. Replies: 4
    Last Post: 03-24-2006, 07:20 AM
  7. 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
  8. 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

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