View Single Post
  #1   Report Post  
ixara ixara is offline
Junior Member
 
Posts: 10
Smile Macro to copy cell value if part of string exist

Dear all,

I've columnA(code), columnB(type) and columnC(empty) in sheet1. I also have columnD(code) and columnE(name) in sheet2. If columnB value is REGION and the 3 character on the right of columnA is equal to value in columnD, then copy value in columnE into columnC. How to create macro to do this?..Below i illustrate the scenario. Thanks in advance for any help.

Sheet1
ColumnA ColumnB ColumnC
ABC2345 BANK
VGD3B23 REGION
HYT8T65 REGION

Sheet2
ColumnD ColumnE
345 VNA
T65 KLE

Expected result in Sheet1
ColumnA ColumnB ColumnC
ABC2345 BANK
VGD3B23 REGION VNA
HYT8T65 REGION KLE