Hi everyone, first post here.
So, I have this spreadsheet that needs to change the values
A B C D E F G
<colgroup><col width="64" span="8" style="width:48pt"> </colgroup><tbody>
</tbody>
Well, every letter there needs to change to the referencial in the column A.
Right now, my code is this
"
Sub Macro1()'
' Macro1 Macro
'
'Line 2
Range("C2:H2").Select
Selection.Replace What:="e", Replacement:=Range("A2").Value, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="z", Replacement:=Range("A2").Value, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="u", Replacement:=Range("A2").Value, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("J6").Select
End Sub
"
In the original sheet I have over 300 lines do format. All ranged E7:BQ7.
So, I need to make a LOOP, changing the range of selection and also my referencial.
Someone can help with this?
Sorry for my bad english.
Thank you!
So, I have this spreadsheet that needs to change the values
A B C D E F G
5 | e | e | z | z | u | u | |
10 | e | e | z | z | u | u | |
20 | e | e | z | z | u | u | |
30 | e | e | z | z | u | u | |
40 | e | e | z | z | u | u | |
50 | e | e | z | z | u | u |
<colgroup><col width="64" span="8" style="width:48pt"> </colgroup><tbody>
</tbody>
Well, every letter there needs to change to the referencial in the column A.
Right now, my code is this
"
Sub Macro1()'
' Macro1 Macro
'
'Line 2
Range("C2:H2").Select
Selection.Replace What:="e", Replacement:=Range("A2").Value, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="z", Replacement:=Range("A2").Value, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="u", Replacement:=Range("A2").Value, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("J6").Select
End Sub
"
In the original sheet I have over 300 lines do format. All ranged E7:BQ7.
So, I need to make a LOOP, changing the range of selection and also my referencial.
Someone can help with this?
Sorry for my bad english.
Thank you!