So i'm trying to apply =Left(B2,4) to a static range that changes daily. How can I apply the formula up to the first empty row of Column B?
Sample workbook attached.
Thanks!
So i'm trying to apply =Left(B2,4) to a static range that changes daily. How can I apply the formula up to the first empty row of Column B?
Sample workbook attached.
Thanks!
You can do something like i do in my report
![]()
Private Sub AddUpdateDaysFormula() Dim LastRow As Long ' THIS GET A TOTAL COUNT OF ROWS BASED ON CLAIM NUMBER LastRow = ThisWorkbook.Worksheets("Cleanup").Range("A" & Rows.Count).End(xlUp).Row ThisWorkbook.Worksheets("Cleanup").Range("K2").FormulaR1C1 = "=DAYS(TODAY(),RC[-8])" ThisWorkbook.Worksheets("Cleanup").Range("K2").AutoFill Destination:=ThisWorkbook.Worksheets("Cleanup").Range("K2:K" & LastRow) End Sub
If you find the suggestion or solution helpful, please consider adding reputation to the post.
Try thisArtik![]()
Sub AAA() Dim lRow As Long lRow = Cells(Rows.Count, "B").End(xlUp).Row Range("A2:A" & lRow).FormulaR1C1 = "=LEFT(RC[1],4)" End Sub
Short and sweet!
![]()
Range("A2:A" & Cells(Rows.Count, "B").End(xlUp).Row) = "=LEFT(B2,4)"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks