+ Reply to Thread
Results 1 to 3 of 3

creating cell to cell formulas vs just copying values?

  1. #1
    Registered User
    Join Date
    06-24-2011
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    36

    creating cell to cell formulas vs just copying values?

    I am trying to write some code that links some cells on different sheets in the same workbook. I also have an offset built in, so I need to keep that. Im not geting any error messages and it works fine, but the code is in a macro that runs BEFORE any data is typed into the cell. So its just copying over 0's, and I want to actually set the formula in those cells so when data does get typed in, it copies over.

    This is what I am currently using

    Range("D37").Value = Range("Requirements!H84").offset(0, i).value * Range("Tables!H3").Value

    and I have tried the R1C1 method but couldnt figure out how to integrate the offset.
    Last edited by buckhunt122; 06-24-2011 at 05:35 PM.

  2. #2
    Registered User
    Join Date
    06-24-2011
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    36

    Re: creating formulas vs copying values?

    this is the R1C1 i was using, "i" is what i was trying to use as my offset. i is an integer and measures the width of a range.

    But I get an error for application defined or object definied error.
    Range("D37").Select
    ActiveCell.FormulaR1C1 = "=Requirements!R[47]C[4+i]*(Tables!R[-34]C[4+i])"

    I feel like what Im trying to do is very simple, I just cant quite get it

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: creating cell to cell formulas vs just copying values?

    Hi buckhunt122

    Please use code tags...please post a sample file.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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