Results 1 to 3 of 3

Thread: VBA Copy Formula Down Without Formatting
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Nov 2017
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default VBA Copy Formula Down Without Formatting

    Hi,
    I have a macro that copies a formula down to the end of the data (with a variable amount of rows) however I was hoping to add something or amend it so that when it copies down it fills without formatting.
    What I have at the moment is:
    Code:
     Range("C2").AutoFillDestination:=Range("C2:C" & Cells(Rows.Count,"A").End(xlUp).Row)
    Any help would be greatly appreciated.
    Thanks

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,062
    Post Thanks / Like
    Mentioned
    467 Post(s)
    Tagged
    47 Thread(s)

    Default Re: VBA Copy Formula Down Without Formatting

    Try
    Code:
    Range("C2:C" & Cells(Rows.Count, "A").End(xlUp).row).Formula = Range("C2").Formula
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    Board Regular
    Join Date
    Feb 2010
    Location
    London, UK
    Posts
    9,287
    Post Thanks / Like
    Mentioned
    24 Post(s)
    Tagged
    3 Thread(s)

    Default Re: VBA Copy Formula Down Without Formatting

    Try:
    Code:
    Dim x As Long
    x = Cells(Rows.Count, 1).End(xlUp).Row
    With Cells(2, 3)
        .Copy
        .Resize(x - 1).PasteSpecial xlPasteFormulas
    End With
    Application.CutCopyMode = False


Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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