Move data from on column to another

lucas50nj

New Member
Joined
Jun 13, 2018
Messages
9
Hello,
I am new to macros and this may be a simple question, hope you can help. PLEASE!! Thanks!

I'm trying to search for any string with a ":" from column M and move it to column D but start at a specific row based on a search i have. For example:

This finds kis emr and returns the row.

Dim rngSearch As Range, rngFound As Range
Set rngSearch = Range("a:a")
Set rngFound = rngSearch.Find(What:="kis emr", LookIn:=xlValues, LookAt:=xlPart)

This finds the ":" and moves it to the row found above but the problem is that when it finds every occurrence of ":" it overwrites the previous move. I need it to increment a row down before it finds the next ":" and move it.

If Range("m" & row).Value Like "*:*" Then 'if found then move it to d column

Range("d" & rngFound.row).Value = Range("m" & row).Value
'Range("d" & row).Value = Range("m" & row).Value
Range("m" & row).Value = ""

End if
 
Glad we could help & thanks for the feedback
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top