SHARE
TWEET

Fill and Value except first cell

Johniny Mar 10th, 2020 322 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub FillNValue()
  2.  
  3. Dim toValRng As Range 'technically could be set to Object
  4. Dim toFillRng As Range
  5.  
  6. Set toFillRng = ThisWorkbook.Worksheets("FillDownM").Range("B2:B11") 'https://docs.microsoft.com/en-us/office/vba/language/concepts/getting-started/creating-object-variables
  7. Set toValRng = ThisWorkbook.Worksheets("FillDownM").Range("B3:B11")
  8.  
  9. toFillRng.FillDown 'https://docs.microsoft.com/en-us/office/vba/api/excel.range.filldown
  10. toValRng.Formula = toValRng.Value
  11.  
  12. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top