+ Reply to Thread
Results 1 to 10 of 10

Formula with Cell showing: 'E3'

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-27-2009
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    230

    Formula with Cell showing: 'E3'

    Hi,
    I'm using a macro that lays this formula in F3:

    =CONCATENATE(RIGHT(LEFT(List_1!E3,7),4),"-",RIGHT(LEFT(List_1!E3,9),2))
    But the macro runs and outputs 'E3' which returns a #value.
    (there's an extra ' before and after the E3.)

    How does that happen?
    Last edited by Sibrulotte; 12-31-2010 at 10:35 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Formula with Cell showing: 'E3'

    That's a formula, not a macro.

    What's the result showing in E3 when the error occurs?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Formula with Cell showing: 'E3'

    Your formula in a simpler way would be:

    =MID(List_1!E3,4,4)&"-"&MID(List_1!E3,8,2)

  4. #4
    Forum Contributor
    Join Date
    07-27-2009
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    230

    Re: Formula with Cell showing: 'E3'

    This is what I have in E3:

    000115910 - BAKELS PLATINUM


    And F3 where my formula is laid down should return:
    1159-10

    Thanks cutter: i'll try that.

    I know it's a formula, but it's running it through the macro that inserts the appostrophes. Whithin the coding the formula doesn'T have it.

  5. #5
    Forum Contributor
    Join Date
    07-27-2009
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    230

    Re: Formula with Cell showing: 'E3'

    I'm sorry I didn't communicate my issue properly.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formula with Cell showing: 'E3'

    You must double up quotations if inserting literally within a string, eg along the lines of:

    .Formula = "=TEXT(MID(List_1!E3,4,6),""0000-00"")"

  7. #7
    Forum Contributor
    Join Date
    07-27-2009
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    230

    Re: Formula with Cell showing: 'E3'

    Range("F3").Select
        ActiveCell.FormulaR1C1 = _
            "=TEXT(MID(List_1!E3,4,6),""0000-00"")"
        Range("F3:F999").Select
        Selection.FillDown

    And it still brings me back the 'E3' with appostrophes.
    Bummed.

    Thank you very much for the cues guys.
    I'll keep looking on the googlers.

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formula with Cell showing: 'E3'

    You're using .FormulaR1C1 but not R1C1 notation

    Either

    a) use .Formula

    or

    b) use R1C1 notation in the formula itself:

    "=TEXT(MID(List_1!RC[-1],4,6),""0000-00"")"

  9. #9
    Forum Contributor
    Join Date
    07-27-2009
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    230

    Re: Formula with Cell showing: 'E3'

    Lovely,
    I I'll try to learn more on the .formulaR1C1 notation, as I'm clueless about the difference.

    Thank you so much!

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formula with Cell showing: 'E3'

    I added a post sometime ago that goes through the basics if interested: http://www.excelforum.com/2171545-post2.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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