I have this bit of code I'm trying to condense.
I've tried the following, but it didn't work.
I also recently learned about looping, but what has me perplexed is how to loop using letters?
My example would be something like
I need help how to use this with column letters.
Thank you
VBA Code:
Columns("F:G").NumberFormat = "0"
Columns("I:J").NumberFormat = "0"
Columns("L:M").NumberFormat = "0"
Columns("O:P").NumberFormat = "0"
I've tried the following, but it didn't work.
VBA Code:
Columns("F:G,I:J,L:M,O:P").NumberFormat = "0"
I also recently learned about looping, but what has me perplexed is how to loop using letters?
My example would be something like
VBA Code:
Dim r As Long
For r = 9 To 7 Step -1
Columns(r & ":" & r + 1).NumberFormat = "0"
Next r
Thank you