Results 1 to 13 of 13

R1C1 Forumla in VBA returning Application-defined error 1004

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-15-2008
    Location
    Arizona
    MS-Off Ver
    Excel 2013
    Posts
    181

    R1C1 Forumla in VBA returning Application-defined error 1004

    When a user selects "Reedsy/Stripe," I need the cell in row E to give the results of this formula. (The number in the row above *.10) + (((The number in the row above + (the number in the row above *.10)) * 0.029 + 0.030).

    This is because the Reedsy fee is 10 percent of their earnings listed in the row above. Then the stripe fee is 0.029 percent + 0.30 cents of their earnings * 10 percent. So if they earned $100. The stripe fees are based on them earning $110.

    However, when a user selects "Reedsy/Stripe," instead of getting the answer in column E in a negative since it is an expense, it gives an application-defined error.


    Here is the vba code where Sheet1.Range("N48")= Reedsy/Stripe. Setup Page R48C17 = 10 percent. Setup Page R44C17 = 0.029 and Setup PAge R44C19 = 0.30.

    Why am I getting an error?

    ElseIf c1.Value = Sheet1.Range("N48") Then
                Cells(c1.Row, "E").FormulaR1C1 = _
                  "=-(R[-1]C*'Setup Page'!R48C17)+(((R[-1]C+(R[-1]C*'Setup Page'!R48C17))*'Setup Page'!R44C17+Setup Page'!R44C19)"
    I feel like I have all the parenthesis right. I tested it on a calculator putting in (100 * .10) + (((100 + (100 * .10)) * 0.029 +0.030) and it gave me the correct answer.
    Last edited by dsrt16; 04-16-2021 at 05:56 PM. Reason: change to solved

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA ERROR: run time error 1004: Application-defined or Object-defined error in excel 2013
    By AnanthKrishna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2015, 06:16 AM
  2. excel macro run time error '1004'- Application defined or object defined error
    By kmadan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2014, 09:51 AM
  3. [SOLVED] Run time error 1004 Application-Defined or Object-Defined Error - Placing data into next e
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-27-2014, 12:57 PM
  4. [SOLVED] Error 1004: Application-defined or object-defined error on Range(Cells(x,y)) syntax
    By winch in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-04-2013, 11:02 AM
  5. [SOLVED] run-time error '1004' application-defined or object-defined error - Excel 2007
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2012, 02:46 AM
  6. Replies: 2
    Last Post: 09-12-2012, 01:01 PM
  7. Replies: 0
    Last Post: 05-14-2012, 11:59 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