Cut and Paste range
Hi All
I have data in column A that says JN or HR or CH I want Excel to identify all data in column A and paste the data into a different sheet i.e All data that starts with JN in column A will be pasted into a JN sheet and all data that starts HR will go ito a sheet called HR Any Ideas?? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200512/1 |
Cut and Paste range
Hi
You could sort the data, then filter it to show only the rows you want, and cut those rows to the other sheets... after each cut operation, delete the blank rows... HTH Philip "Crowbar via OfficeKB.com" wrote: Hi All I have data in column A that says JN or HR or CH I want Excel to identify all data in column A and paste the data into a different sheet i.e All data that starts with JN in column A will be pasted into a JN sheet and all data that starts HR will go ito a sheet called HR Any Ideas?? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200512/1 |
Cut and Paste range
Sub CopySortData()
Dim i As Integer, last As Integer, prefix As String last = ActiveSheet.Range("A65536").End(xlUp).Row For i = 1 To last prefix = Left(Cells(i, 1).Value, 2) If prefix < "" Then Worksheets(prefix).Cells(i, 1).Value = ActiveSheet.Cells(i, 1).Value End If Next i End Sub Works for me, though I'm sure you'll want to add refinements. -- Gordon Rainsford London UK "Crowbar via OfficeKB.com" <u15117@uwe wrote: Hi All I have data in column A that says JN or HR or CH I want Excel to identify all data in column A and paste the data into a different sheet i.e All data that starts with JN in column A will be pasted into a JN sheet and all data that starts HR will go ito a sheet called HR Any Ideas?? |
All times are GMT +1. The time now is 12:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com