CTRL + D without formatting

CTRL + D without formatting

January 23, 2020

The below VBA code, posted here by Scott, can be used to autofill a selected range of cells with the data in the cell above the range, but without copying the formatting from the source cell, as would be done if the common CTRL + D command were used. 

 

1. Press ALT + F11 and paste the vba code in new module for the workbook in the project list on the left. 

 

2. Select the cell with the data you want to copy and the cells to be filled. 

 

3. Run the macro and the data will be copied down without the formatting from the source cell.  

 

 

 

Sub Extend_Content_From_Above()
    Dim above As Range

    For Each cur In Selection
        Set above = cur.Offset(-1, 0)
        above.AutoFill Destination:=Range(above, cur), Type:=xlFillValues
    Next cur
 End Sub
 

Please reload

Contact Me With Your Litigation Support Questions:

seankevinoshea@hotmail.com

  • Twitter Long Shadow

© 2015 by Sean O'Shea . Proudly created with Wix.com