Forum Discussion

Guram_Bregadze's avatar
Guram_Bregadze
Copper Contributor
Jul 03, 2024
Solved

VBA to create new CSV file from the existing one with modified email address

Hello,   I need a VBA which will automatically create a new CSV file from the old one (attached) based on this criteria: Update column email with domain abc.com Email format: first letter from nam...
  • HansVogelaar's avatar
    HansVogelaar
    Jul 03, 2024

    Guram_Bregadze 

    Change

            sMail = wsh.Range("B" & r).Value & Left(wsh.Range("C" & r).Value, 1) & _
                Split(wsh.Range("C" & r).Value)(1) & "@abc.com"

    to

            sMail = Left(wsh.Range("C" & r).Value, 1) & Split(wsh.Range("C" & r).Value)(1) & _
                wsh.Range("B" & r).Value & "@abc.com"
    

Resources