![]() |
I need to find a macro to find data cut and paste to another colu.
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! |
I need to find a macro to find data cut and paste to another colu.
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) "Rex" wrote in message ... 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! |
I need to find a macro to find data cut and paste to another colu.
Thanks, I will give it a try
|
I need to find a macro to find data cut and paste to another colu.
Well I gave it a try but on writing the macro and trying to run it i
got a complie error - End if without block if I am very new to VBA - all a bit confusing |
I need to find a macro to find data cut and paste to another colu.
Well I gave it a try but on writing the macro and trying to run it i
got a complie error - End if without block if I am very new to VBA - all a bit confusing |
I need to find a macro to find data cut and paste to another colu.
Ok, had another go and macro seemed to run OK except that it is copying
data to column C rather that cutting and pasting. Is there a way to correct this or then run a macro to delete thhe duplicates in column D? |
I need to find a macro to find data cut and paste to another colu.
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 Cells(i, "C").Value = "" End If Next -- HTH RP (remove nothere from the email address if mailing direct) "Rex" wrote in message oups.com... Ok, had another go and macro seemed to run OK except that it is copying data to column C rather that cutting and pasting. Is there a way to correct this or then run a macro to delete thhe duplicates in column D? |
All times are GMT +1. The time now is 12:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com