Hi,
I have one code which can find last row and apply sum function.
Im looking something which willl do for filtered valus as well.
sorry i am not sure how to paste code here.....
Thanks
Printable View
Hi,
I have one code which can find last row and apply sum function.
Im looking something which willl do for filtered valus as well.
sorry i am not sure how to paste code here.....
Thanks
Sorry still not find....# 1 is not working
Do i need to paste code in between code/code...no sure but I am attaching a excel with code in it...
hope that will help. thanks
what is wrong with the Aggregate function?Code:Sub addtwo()
Dim LastRow As Long
With Sheets("FY-2017")
LastRow = .Cells(.Rows.Count, 6).End(xlUp).Row
.Range("J1").Formula = "=Aggregate(9,7,F2:F" & LastRow & ")"
End With
End Sub
if you want to display the formula result rather then the formula in a cell, you can use Evaluate method
Code:.Range("J1").Value = Evaluate("=Aggregate(9,7,F2:F" & LastRow & ")")
Thanks Mancubus...it is working fine now.....apprecaite your time
you are are welcome
mark the thread as solved (my signature, #3) for future references to the thread pls.