• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

multiplication formula to convert in vba

RAM72

Member
Hi All
I have a worksheet where I had to add charges to detail product

The coefficient number is AK 5i n yellow

AA2 value is multipy to AK5 which is a fixed amount still to last row of data

I recorded a macro

Need some help to convert in vba to last data row but the formula should not appear in

AB column


Code:
'


multiplication_macro Macro
'

'

Dim LR As Long
LR = Range("AA" & Rows.Count).End(xlUp).Row
Range("AB2").AutoFill Destination:=Range("AB:AB" & LR
    Range("AB2").Select
    ActiveCell.FormulaR1C1 = "=RC[-1]*R5C39"
    Range("AB2").Select
    Selection.AutoFill Destination:=Range("AB2:AB159"), Type:=xlFillDefault
    'Range("AB2:AB159").Select
End Sub
 

Attachments

  • MULTIPLICATION.xlsx
    48.6 KB · Views: 11
Try
Code:
Sub test()
    With Range("aa2", Range("aa" & Rows.Count).End(xlUp))
        .Offset(, 1).Value = Evaluate(.Address & "*ak5")
    End With
End Sub
 
Back
Top