+ Reply to Thread
Results 1 to 10 of 10

Enter formula into ActiveCell

  1. #1
    Registered User
    Join Date
    02-16-2016
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    15

    Enter formula into ActiveCell

    I'm using the below code to try and insert the "Value1" formula into the ActiveCell (i.e. the cell in the first blank row offset by a column, which would be in column B). Whenever I try running the code I get Run-time Error '1004': Application-defined or object-defined error for the "ActiveCell.FormulaR1C1 = Value1" line in the code. If someone could please help me figure this out that'd be great! Thank you!

    Please Login or Register  to view this content.

  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: Enter formula into ActiveCell

    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 Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Enter formula into ActiveCell

    Not tested but try this:
    Please Login or Register  to view this content.

  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: Enter formula into ActiveCell

    Try:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-16-2016
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    15

    Re: Enter formula into ActiveCell

    Unfortunately none of those worked. I'm still getting the same error.

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

    Re: Enter formula into ActiveCell

    It ran on my system, can you:Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  7. #7
    Registered User
    Join Date
    02-16-2016
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    15

    Re: Enter formula into ActiveCell

    Attached is a file to use, per your suggestion. As I mention in the cell in the "After" sheet, I'm trying to get the formula inserted into that cell in the first blank cell of column B. Let me know if you have any questions.
    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: Enter formula into ActiveCell

    Hi BigTenBoy,

    Thanks for the rep!

    This works for me:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    02-16-2016
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    15

    Re: Enter formula into ActiveCell

    When I tried it in my other workbook it created a circular reference and my spreadsheet went crazy. Any reason why? I tried using ActiveCell.Offset(-1,0) instead of ActiveCell.Address in the later part of the code but that brought back the original error I had before.

  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: Enter formula into ActiveCell

    I didn't test your Do...Loop; that would be my guess - try the formula without that Do...Loop

+ 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. Sum ActiveCell Value with Formula
    By Fjcosta in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2015, 06:21 PM
  2. Selecting Activecell and cell next to the Activecell
    By Raghukumarn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2013, 06:32 AM
  3. With VBA Enter Ctrl Shift Enter For Array Formula
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-17-2013, 09:02 AM
  4. [SOLVED] Activecell.formula vba
    By DeNam in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-31-2013, 06:46 AM
  5. How to enter Activesheet Name into ActiveCell SYNTAX?
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-08-2012, 05:10 PM
  6. Output contents of Activecell when Activecell may be string or numeric.
    By jfriddle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2012, 12:27 PM
  7. Replies: 2
    Last Post: 10-20-2005, 05:05 PM

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