GCC
GCC

Reputation: 295

How to set number format on multiple columns?

This should be a simple fix but I cannot find an answer to this online. I am trying to apply a number format for multiple columns.

.Columns("W:Y, AB:AC").NumberFormat = "#,##0.0%;[Red](#,##0.0%)"

However, when I apply this code, I get a "mismatch" error. I can run this code fine if split up the column ranges but when I try to combine them to make my code more efficient, it fails.

Any help would be greatly appreciated.

Thanks,

GCC

Upvotes: 0

Views: 995

Answers (1)

DevGin
DevGin

Reputation: 453

Per Peh's response below:

Range("W:Y,AB:AC").NumberFormat = "#,##0.0%;[Red](#,##0.0%)"

Upvotes: 4

Related Questions