LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search/Match/Find ANY part of string to ANY part of Cell Value TWhizTom Excel Worksheet Functions 0 July 21st 08 08:16 PM
Copy Worksheet to a new Workbook creating if it doesn't exist and add more Worksheets if it does exist [email protected] Excel Programming 4 June 18th 06 06:08 PM
Using macro to copy a part of a cell content to next cell Charles Excel Discussion (Misc queries) 6 May 31st 06 05:57 AM
Use Macro to copy part of text in cell PhilipsBernard Excel Programming 2 October 17th 05 09:09 AM
Move Part of Cell String tom[_7_] Excel Programming 8 October 13th 05 06:37 PM


All times are GMT +1. The time now is 08:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"