Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional Copy Macro Help Needed

I need a macro that copies rows only if certain text is in column A

For example if Cell "A5" is Evan Jones, then Cells B5-J5 will get
copied to the sheet named "Evan Jones", and if another cell in column A
also says Evan Jones then the same applies for its row except it will
be put in the next row of "Evan Jones" sheet.
I have several names that this will be working with in "Column A" which
is titled "Customer Name", and each line will have information in
columns B-J for those rows....
I hope you understand what I mean, and I hope someone can help....

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Conditional Copy Macro Help Needed

The following macro might work for you.
I assume that a sheet exists for every name that is in Column A, starting
with A2. An error will result if this is not the case. HTH Otto
Sub CopyData()
Dim RngColA As Range
Dim i As Range
Application.ScreenUpdating = False
Set RngColA = Range("A2", Range("A" & Rows.Count).End(xlUp))
For Each i In RngColA
With Sheets(i.Value)
Range(Cells(i.Row, 2), Cells(i.Row, 10)).Copy
.Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial
End With
Next i
Application.ScreenUpdating = True
End Sub
wrote in message
ups.com...
I need a macro that copies rows only if certain text is in column A

For example if Cell "A5" is Evan Jones, then Cells B5-J5 will get
copied to the sheet named "Evan Jones", and if another cell in column A
also says Evan Jones then the same applies for its row except it will
be put in the next row of "Evan Jones" sheet.
I have several names that this will be working with in "Column A" which
is titled "Customer Name", and each line will have information in
columns B-J for those rows....
I hope you understand what I mean, and I hope someone can help....

Thanks



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
Conditional Format Help Needed Scott Excel Discussion (Misc queries) 4 February 12th 10 06:00 PM
macro needed to compare value and copy data underneath it to anoth Arain Excel Discussion (Misc queries) 1 April 17th 07 10:52 PM
Conditional Copy Paste Macro WH Excel Discussion (Misc queries) 1 March 17th 06 11:02 PM
Conditional formating help needed PCOR Excel Worksheet Functions 2 August 25th 05 04:43 AM
Conditional Formating with VBA help needed Christian P Excel Programming 1 November 27th 03 05:19 PM


All times are GMT +1. The time now is 03:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"