Hi all!
I have to put these ranges in for 40 layouts (Distros). I was wondering if there was an easier way to write this.
Something like this for example: C5:M49, except every other column and repeat every 4th row. Or do I just need to input each cell like I'm doing?
Also,
Is it possible to to replace text like with "Find and Replace"? Like if I highlighted C5,E5,G5,I5,K5,M5 I would like to replace 5 with 9.
(FYI, I am on a MAC and I can't put in all 96 ranges on 1 line and that's why I am using 2 line per layout
I have to put these ranges in for 40 layouts (Distros). I was wondering if there was an easier way to write this.
Something like this for example: C5:M49, except every other column and repeat every 4th row. Or do I just need to input each cell like I'm doing?
Also,
Is it possible to to replace text like with "Find and Replace"? Like if I highlighted C5,E5,G5,I5,K5,M5 I would like to replace 5 with 9.
(FYI, I am on a MAC and I can't put in all 96 ranges on 1 line and that's why I am using 2 line per layout
VBA Code:
'Distro 1
Set rng = Range("C5,E5,G5,I5,K5,M5,C9,E9,G9,I9,K9,M9,C13,E13,G13,I13,K13,M13,C17,E17,G17,I17,K17,M17,C21,E21,G21,I21,K21,M21,C25,E25,G25,I25,K25,M25")
Set rng = Union(rng, Range("C29,E29,G29,I29,K29,M29,C33,E33,G33,I33,K33,M33,C37,E37,G37,I37,K37,M37,C41,E41,G41,I41,K41,M41,C45,E45,G45,I45,K45,M45,C49,E49,G49,I49,K49,M49"))
'Distro 2
Set rng = Union(rng, Range("C58,E58,G58,I58,K58,M58,C62,E62,G62,I62,K62,M62,C66,E66,G66,I66,K66,M66,C70,E70,G70,I70,K70,M70,C74,E74,G74,I74,K74,M74,C78,E78,G78,I78,K78,M78"))
Set rng = Union(rng, Range("C82,E82,G82,I82,K82,M82,C86,E86,G86,I86,K86,M86,C90,E90,G90,I90,K90,M90,C94,E94,G94,I94,K94,M94,C98,E98,G98,I98,K98,M98,C102,E102,G102,I102,K102,M102"))
If Len(Target.Value) = 0 Then
Application.EnableEvents = False
Target.Value = "Spare"
Application.EnableEvents = True
End If
/CODE]
TIA!