Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rex Rex is offline
external usenet poster
 
Posts: 26
Default 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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default I need to find a macro to find data cut and paste to another colu.

Thanks, I will give it a try

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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?



Reply
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
How can I find the minium date in column B subject to data in Colu Gwynneth Excel Discussion (Misc queries) 3 October 26th 07 05:50 PM
Macro to find text string in a column and paste data in another nicolascap Excel Discussion (Misc queries) 8 March 14th 06 03:13 PM
Macro to Find, Cut, and Paste Rob Excel Discussion (Misc queries) 3 September 1st 05 09:37 PM
I need a macro to find cut and paste data to new cell Rex Excel Discussion (Misc queries) 0 December 6th 04 12:45 AM
I need a macro to find cut and paste data to new cell Rex Excel Discussion (Misc queries) 0 December 6th 04 12:23 AM


All times are GMT +1. The time now is 11:52 PM.

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"