I need to find a macro to find data cut and paste to another colu.

G

Guest

I have imported data into excel of which the content are accounting journal
entries. As the comment relating to the journal ends up in column D above the
journal numbers (also in column D) I need a macro that will find all of the
comments that will all contain a common word such as "To" and cut and paste
them into column C so that I will be able to sort the data or use pivot
tables to identify duplicate entries. Any ideas appreciated!
 
B

Bob Phillips

Dim i
For i = 1 To Cells(Rows.Count, "D").End(xlUp).Row
If LCase(Cells(i, "D").Value) Like "*to*" Then
Cells(i, "C").Value = Cells(i, "D").Value
End If
Next

be aware thoughthat this will also find such as together.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top