I am applying number format to multiple columns using the following code. however, I would like to optimize it so that it runs faster.
Range("AC18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AD18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AF18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AG18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AI18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AJ18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AL18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AM18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AO18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AP18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AR18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Range("AS18").Resize(Cells(Rows.Count, "B").End(xlUp).Row - 17).NumberFormat = "$#,##0.000_);[Red]($#,##0.000)"
Last edited: