+ Reply to Thread
Results 1 to 10 of 10

Cannot paste formula into offset active cell

  1. #1
    Forum Contributor
    Join Date
    06-17-2012
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    150

    Cannot paste formula into offset active cell

    Hello,

    I keep getting Application-defined or object-defined error in the third line of this code and cannot figure it out the reason for it.
    First step, I remove the $ from MyRange (converts $A1:$A100 to A1:A100). Second step, I want to paste the formula with this defined range into an offset cell.

    Attempt 1
    HTML Code: 
    Attempt 2
    HTML Code: 
    And none of them worked. Thanks for your help.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Cannot paste formula into offset active cell

    Is DynRangeA a string? If so try:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    06-17-2012
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    150

    Re: Cannot paste formula into offset active cell

    @xldept

    Yes. It is a declared string. The problem happens in here,

    HTML Code: 

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Cannot paste formula into offset active cell

    Did you try the Address modification?

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try This !


    As per Excel Model Object :

    Please Login or Register  to view this content.
    No need any Select in code !
    So better than ActiveCell just use [A68] …

    And better than ActiveCell.Offset(, 5) just use [F68] !

    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 07-07-2018 at 05:22 AM.

  6. #6
    Forum Contributor
    Join Date
    05-12-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    266

    Re: Cannot paste formula into offset active cell

    Removed the answer
    Last edited by SjonR; 07-07-2018 at 05:34 AM.

  7. #7
    Forum Contributor
    Join Date
    06-17-2012
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    150

    Re: Hi ! Try This !

    I tried using your line and it did not work. I created a file to show the error. I was previously at work when I posted this thread and the firewalls do not allow me to update any file.
    Attached Files Attached Files

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Cannot paste formula into offset active cell

    Looks like it was a coding glitch - this runs:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    06-17-2012
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    150

    Re: Cannot paste formula into offset active cell

    Your revamped code worked. Thank you so much for your help. This saved me HOURS of work!!!!

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Cannot paste formula into offset active cell

    You're welcome and thanks for the rep!

+ 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. Offset formula references (only active sheet's)
    By Grho in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2018, 03:09 AM
  2. Copy - Paste entire table into one cell using active cell formula
    By alexgoaga in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2017, 10:14 AM
  3. Replies: 4
    Last Post: 07-03-2015, 04:27 AM
  4. [SOLVED] Copy/Paste cell above the formula or active cell
    By hockeysimo09 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-15-2014, 10:35 AM
  5. [SOLVED] Formula with offset from active cell and sum until blank cell
    By ArnolddG in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-27-2013, 03:15 PM
  6. VBA Paste formula from active cell problem
    By Mikenitti in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2013, 02:06 PM
  7. Running a different Active.Cell Offset.....
    By Kirtman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2012, 05:52 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