+ Reply to Thread
Results 1 to 15 of 15

Excel Cell formula issue

  1. #1
    Registered User
    Join Date
    06-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    14

    Excel Cell formula issue

    Hi,

    I am facing problem with cell formula to capture in macro, complete formula not populating while recording macro.

    Lines are disconnecting, (Ex: In code one of the lines has "CONCATENATE(LEFT(R2,33)" , it's coming as "CONCAT"& _" but in next line there is no continuation)

    Attached is the formula and output macro code. Is there any limitation on cell formula lines? even if i changed continuously without spaces it's not working.

    I am using 2010 excel, please help me on this.

    Thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Excel Cell formula issue

    You've envlosed your things like carriage return chr(10) in inverted commas so they are being treated as a string rather than chr(10)

    Also, i dont think carriage returns are advisable in formulae.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    06-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Excel Cell formula issue

    Thanks for the quick reply Nathan, i have removed all the spaces, change cell wrap text and tried but no luck...can you please advise how to resolve it or is there any other short way to get that formula logic?

  4. #4
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Excel Cell formula issue

    Hi arkrish,

    There is limitation on formula lines, but your formula size is under max limit.
    Check the below link for the same :
    http://office.microsoft.com/en-in/ex...010073849.aspx

    Also, please provide an excel file in which you got the formula, dont provide formula in txt file.


    Regards,
    Paresh J
    Click on "* Add Reputation" as a way to say thanks

  5. #5
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Excel Cell formula issue

    Hi,

    Just found out that in your ActiveCell.FormulaR1C1 =, please check the fifth, sixth line of the txt file :
    which contains Concatenate function is not proper :
    1) RC[12],19
    2) LEFT(RC[12],33)


    Regards,
    Paresh J

  6. #6
    Registered User
    Join Date
    06-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Excel Cell formula issue

    Hi Paresh,

    Attaching the excel sheet to give more detailed, still it's not working.

    Thanks,
    Krish
    Attached Files Attached Files

  7. #7
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Excel Cell formula issue

    Hi,

    Please provide Excel with macro code which is creating issue.


    Regards,
    Paresh J

  8. #8
    Registered User
    Join Date
    06-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Excel Cell formula issue

    Attached the sheet with macro..
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    06-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Excel Cell formula issue

    Hi anyone help on this issue?

  10. #10
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Excel Cell formula issue

    Hi Arkish,

    My apologies that I could not reply you earlier.
    Check the attached macro, I have done is I have taken formula from cell E5 and use the same formula for cell E7. Check whether this is what you want:


    Attachment :
    Book3.xlsm


    Regards,
    Paresh J

  11. #11
    Registered User
    Join Date
    06-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Excel Cell formula issue

    Hi Paresh,

    I dont see any formula in cell E7, can you please upload right excel with macro enabled?

    Thanks

  12. #12
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Excel Cell formula issue

    Hi,

    You need to run the macro after which formula of E5 will be get visible in E7. RUN THE MACRO...


    Regards,
    Paresh J

  13. #13
    Registered User
    Join Date
    06-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Excel Cell formula issue

    when i am recording my formula, again its giving the same error, start record and can you please write/copy paste then stop macro record, then i am getting the same error...missing some code.

    Can you please take cell formula and tried to record formula in macro...

  14. #14
    Registered User
    Join Date
    06-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Excel Cell formula issue

    Giving example...

    I have column B, C has 20k record values, and want to insert formula in E (i.e. active cell (first cell)), so now write formula in E column, apply the same formula for all cells in E column.

    This is what i need and i want to automate that through macro, so when i will do it in Excel it works without any issue.

    but when i record macro to generate the code for that, it's not giving complete formula and it's giving error even i am trying to execute through code.

  15. #15
    Registered User
    Join Date
    06-13-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Excel Cell formula issue

    Giving example...

    I have column B, C has 20k record values, and want to insert formula in E (i.e. active cell (first cell)), so now write formula in E column, apply the same formula for all cells in E column.

    This is what i need and i want to automate that through macro, so when i will do it in Excel it works without any issue.

    but when i record macro to generate the code for that, it's not giving complete formula and it's giving error even i am trying to execute through code.

+ 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: 2
    Last Post: 11-23-2010, 11:17 AM
  2. Issue with Formula that Reads a Cell with Character 10
    By Caligula in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2008, 04:57 PM
  3. VBA/Excel formula issue
    By spinkung in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2007, 08:01 AM
  4. Cell = Formula issue
    By EFGMan in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 01-11-2007, 06:56 PM
  5. Excel Formula Issue
    By [email protected] in forum Excel General
    Replies: 2
    Last Post: 08-16-2006, 06:50 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