#1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 15
Default copy macro

Hi,

If Sheet1 contains "Technology" in Column H, I would like it to copy
the entire row to Sheet 2. I have looked at other posts but still
cannot get it.

Any help would be appreciated.

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default copy macro

Hi Dan,

Do you want rows from Sheet1 to be copied to same row num in sheet2, or next
available row ?

Cheers,
--
AP

"dan" a écrit dans le message de news:
...
Hi,

If Sheet1 contains "Technology" in Column H, I would like it to copy
the entire row to Sheet 2. I have looked at other posts but still
cannot get it.

Any help would be appreciated.

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default copy macro

If same row, try:

Sub tester()
Dim rCell As Range
For Each rCell In Worksheets("Sheet1").UsedRange.Columns("H").Cells
If rCell.Value = "Technology" Then
rCell.EntireRow.Copy Worksheets("Sheet2").Cells(rCell.Row, "A")
End If
Next rCell
End Sub

HTH
--
AP

"Ardus Petus" a écrit dans le message de news:
...
Hi Dan,

Do you want rows from Sheet1 to be copied to same row num in sheet2, or
next available row ?

Cheers,
--
AP

"dan" a écrit dans le message de news:
...
Hi,

If Sheet1 contains "Technology" in Column H, I would like it to copy
the entire row to Sheet 2. I have looked at other posts but still
cannot get it.

Any help would be appreciated.

Thanks!





  #4   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 15
Default copy macro

Thank you so much for your response. I would like it to just dump rows
with Technology in the next available row. If you could help me modify
this that would be great.

Thanks!!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default copy macro

Sub tester()
Dim rCell As Range
For Each rCell In Worksheets("Sheet1").UsedRange.Columns("H").Cells
If rCell.Value = "Technology" Then
rCell.EntireRow.Copy Worksheets("Sheet2") _
.Cells(Rows.Count, "A").End(xlUp).Item(2)
End If
Next rCell
End Sub

HTH
--
AP

"dan" a écrit dans le message de news:
...
Thank you so much for your response. I would like it to just dump rows
with Technology in the next available row. If you could help me modify
this that would be great.

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
Copy workbook, don't copy macro CongroGrey Excel Discussion (Misc queries) 1 June 13th 08 04:56 PM
copy macro help Michael A Excel Programming 10 March 6th 05 09:19 PM
Help with copy macro Kel Excel Discussion (Misc queries) 13 February 21st 05 11:44 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM


All times are GMT +1. The time now is 12:31 AM.

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"