Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Copy and paste

Hi,

The code below loops through rows checking two offset cells to the right of
the active cell until an empty row is found it then resets to the top row two
cells offset from the original active cell. Should any of the rows reach a
specific criterion a User Form shows with a text box showing the letters in
(b & target row). After sixty seconds the process starts over again.


Sub CheckVolumeRise()
StartTimer1
Do
If ActiveCell<ActiveCell.Offset(0,2) And ActiveCell.Offset(0,2) < _
ActiveCell.Offset(0, 4) Then
CriteriaReached.Show
ActiveCell.Offset(1, 0).Activate
Else
ActiveCell.Offset(1, 0).Activate
End If
Loop Until IsEmpty(ActiveCell)
ActiveCell.Offset(-1, 0).Activate
Selection.End(xlUp).Select
ActiveCell.Offset(0, 2).Activate
End Sub

I would like to be able to copy and paste the contents of (b & target row)
to Sheet2 in the same Workbook and still have the User Form (CriteriaReached)
show.

Please will someone show me how to do this.

Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Copy and paste

Rob,

Where in sheet2? I have assumed that you want the copied cell or value in
the first blank cell at the bottom of column B.

If ActiveCell<ActiveCell.Offset(0,2) And ActiveCell.Offset(0,2) < _
ActiveCell.Offset(0, 4) Then
'Use ONE of these lines
'To copy the cell
' Cells(ActiveCell.Row,2).Copy
Sheets("Sheet2").Cells(Rows.Count,2).End(xlUp)(2)
'To put the value into another cell
' Sheets("Sheet2").Cells(Rows.Count,2).End(xlUp)(2). Value =
Cells(ActiveCell.Row,2).Value
CriteriaReached.Show
ActiveCell.Offset(1, 0).Activate
Else
......

HTH,
Bernie
MS Excel MVP


"Rob" wrote in message
...
Hi,

The code below loops through rows checking two offset cells to the right
of
the active cell until an empty row is found it then resets to the top row
two
cells offset from the original active cell. Should any of the rows reach a
specific criterion a User Form shows with a text box showing the letters
in
("b" & target row). After sixty seconds the process starts over again.


Sub CheckVolumeRise()
StartTimer1
Do
If ActiveCell<ActiveCell.Offset(0,2) And ActiveCell.Offset(0,2) < _
ActiveCell.Offset(0, 4) Then
CriteriaReached.Show
ActiveCell.Offset(1, 0).Activate
Else
ActiveCell.Offset(1, 0).Activate
End If
Loop Until IsEmpty(ActiveCell)
ActiveCell.Offset(-1, 0).Activate
Selection.End(xlUp).Select
ActiveCell.Offset(0, 2).Activate
End Sub

I would like to be able to copy and paste the contents of ("b" & target
row)
to Sheet2 in the same Workbook and still have the User Form
(CriteriaReached)
show.

Please will someone show me how to do this.

Thank you.



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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Automating copy/paste/paste special when row references change Carl LaFong Excel Programming 4 October 8th 07 06:10 AM
help w/ generic copy & paste/paste special routine DavidH[_2_] Excel Programming 5 January 23rd 06 03:58 AM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
Copy and Paste macro needs to paste to a changing cell reference loulou Excel Programming 0 February 24th 05 10:29 AM


All times are GMT +1. The time now is 11:18 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"