I am working on data transformation with about 20 parameters to be replaced. The first part of the code with range A1 was simple and in worked. However, for some reason the second part of the code when I attempt to check the whole column starting from row 2 in column A is not working. Where is the catch?
VBA Code:
Dim OriginalTextAssetName As String
Dim CorrectedTextAssetName As String
OriginalTextAssetName = Range("A1").Value
CorrectedTextAssetName = Replace(OriginalTextAssetName, "AssetName", "Commodity")
Range("A1").Value = CorrectedTextAssetName
Dim OriginalTextCorn As String
Dim CorrectedTextCorn As String
OriginalTextCorn = Range("A2:A").Value
CorrectedTextCorn = Replace(OriginalTextCorn, "AAAA", "BBBB")
Range("A2:A").Value = CorrectedTextCorn