G
Guest
Hi,
I need to choose among different ranges depending on the value of one cell.
for example, if the value of cell A1 is "IT", I need to subtitute all "GE"
text in a range cells with "IT".
Here is what I have, but it works for only one case. I need for 21 different
choices in cell A1.
Range("D6:E111,H6:I111,L6:M111,M113,L113,I113,H113,E113,D113,M224,L224,I224,H224,E224,D224").Select
Selection.Replace What:="GE", Replacement:="IT", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Is there any kind of loop for this?
I need to choose among different ranges depending on the value of one cell.
for example, if the value of cell A1 is "IT", I need to subtitute all "GE"
text in a range cells with "IT".
Here is what I have, but it works for only one case. I need for 21 different
choices in cell A1.
Range("D6:E111,H6:I111,L6:M111,M113,L113,I113,H113,E113,D113,M224,L224,I224,H224,E224,D224").Select
Selection.Replace What:="GE", Replacement:="IT", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Is there any kind of loop for this?