Hello experts, I found the following excellent procedure:
Dim cel As Range, rg As Range
Dim lastrow As Long
lastrow = Range("A" & Rows.Count).End(xlUp).Row
If lastrow < 2 Then Exit Sub
Application.ScreenUpdating = False
Set rg = Range("A2:AZ" & lastrow)
For Each cel In rg.Rows(1).Cells
If cel.HasFormula Then
Intersect(cel.EntireColumn, rg).PasteSpecial xlPasteFormulas
I would like to adapt the code by adding the following requirement:
1-Be able to place a formula in the cell that I want ex: A5 and fill down the formula till the last row of a reported column.
Ex: I place a formula in A5.
When I launch the procedure I should have:
1-An input box asking "Select or report the range location of your formula?". Activecell by default.
2-An input box asking "Select or report your last column in which you want to paste your formula?", remark: I should be able to select the same column letter in which is located my formula.
3-The procedure should paste the formula as of the range of my formula to the reported column & last used row.
The idea is to add this procedure to my Personal.xlsb so we can use Activesheet as worksheet.
Thank you again for your help.