Rahul12
Rahul12

Reputation: 3

Cut and paste specific data from one column to another

I need help in executing following:

on sheet 1 :

Column 'A' has 1000 lines of data like example below:

A
Hello  ABC 123456
Hi     ABC 98765
Hey    ABC 46892
:
:
:
:
HRU   ABC 73028

and so on...

Now I wanted to cut and paste specific data from Column A and paste it in Column B. Like Data to cut is from "ABC Numbers" and paste in Column 'B'

Here's what I getting trouble I am able to cut and paste complete data from A to B but is there some script that i can use to cut and paste only specific data?

Always Column "A" data to cut is from "ABC Numbers" here ABC is common for all the 1000's of rows

Upvotes: 0

Views: 445

Answers (2)

user3598756
user3598756

Reputation: 29421

use Replace() method of Range object:

Range("A1", Cells(Rows.Count,1).End(xlUp)).Replace "*ABC", "ABC", xlPart

Upvotes: 1

Scott Craner
Scott Craner

Reputation: 152505

Use MID and FIND:

=MID(A1,FIND("ABC",A1),LEN(A1))

enter image description here

Upvotes: 1

Related Questions