+ Reply to Thread
Results 1 to 3 of 3

Trying to 'write' a formula in a cell with a variable reference

  1. #1
    Registered User
    Join Date
    02-12-2007
    Posts
    2

    Trying to 'write' a formula in a cell with a variable reference

    Hi,

    I'm trying (and failing!) to write a formula into a cell using vba which has a variable address;

    So far I have tried all sorts of variants on the theme;

    Worksheets("subs").Range("u" & insertrows + 13).Formula = "=t" & 12 + insertrows & "/ "l" & 11 + insertrows" (just a snippet of code...)

    ie if insertrows = 10, i need to get the following formula into cell U23
    =t22 / l21

    any help appreciated before I go completely bald!!

    Thanks.
    Last edited by stumpy; 02-12-2007 at 01:02 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Stumpy,

    Here is the code you need...

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    02-12-2007
    Posts
    2
    ...Thank you very much.

+ 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