Consulting

Results 1 to 3 of 3

Thread: add formula to first available cell column B

  1. #1
    VBAX Newbie
    Joined
    Jul 2018
    Posts
    5
    Location

    Question add formula to first available cell column B

    Hi,

    What do I need to change this code to so that is doesn't add my formula to R18 C1, but instead adds it to the first available cell in B: ActiveCell.FormulaR1C1 = "=NEW!R[-18]C[1]"

    the formula I want to add to the cell will be: ='NEW'!C2 (basically I want to copy from NEW cell C2, and see that in another Sheet)


    Sub new_1()
    '
    ' new_1 Macro
    '


    '
    Sheets("TEMPLATE").Select
    Sheets("TEMPLATE").Copy After:=Sheets(8)
    Sheets("TEMPLATE (2)").Select
    Sheets("TEMPLATE (2)").Name = "NEW"

    Sheets("Summary").Select
    Dim foundBlank As Range
    Set foundBlank = Range("B3:B1000").Find(What:="", lookat:=xlWhole)
    foundBlank.Select


    ActiveCell.FormulaR1C1 = "=NEW!R[-18]C[1]"
    ActiveCell.Offset(0, 1).Select

    ActiveCell.FormulaR1C1 = "='NEW '!R[-3]C[1]"


    End Sub

  2. #2
    VBAX Tutor MINCUS1308's Avatar
    Joined
    Jun 2014
    Location
    UNDER MY DESK
    Posts
    254
    adma,
    Is this a different question or was it resolved with my solution to your other post:
    http://www.vbaexpress.com/forum/show...747#post381747
    - I HAVE NO IDEA WHAT I'M DOING

  3. #3
    VBAX Newbie
    Joined
    Jul 2018
    Posts
    5
    Location
    it is the same sorry

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •