Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default a few adjustment for a do-loop escape

i need to place a criteria to enable the macro from stop its execution
if J324=0, then end
----
Sub filldown()
Do
If Range("J324").Formula 0 Then
Range("J324").Copy
Range("C88").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("E225:E263").Copy
Range("l8500").End(xlUp).Offset(1, 0).PasteSpecial
Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
End If
Loop
End Sub
-----
regards,
driller


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default a few adjustment for a do-loop escape

Hi,

You don't need a do loop, try this

Sub filldown()
If Range("J324").Formula 0 Then
Range("J324").Copy
Range("C88").PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range("E225:E263").Copy
Range("l8500").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=True
End If
End Sub

Mike

"dribler" wrote:

i need to place a criteria to enable the macro from stop its execution
if J324=0, then end
----
Sub filldown()
Do
If Range("J324").Formula 0 Then
Range("J324").Copy
Range("C88").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("E225:E263").Copy
Range("l8500").End(xlUp).Offset(1, 0).PasteSpecial
Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
End If
Loop
End Sub
-----
regards,
driller


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default a few adjustment for a do-loop escape

Mike,

thanks, it works to paste values only on the first row.
any idea?

"Mike H" wrote:

Hi,

You don't need a do loop, try this

Sub filldown()
If Range("J324").Formula 0 Then
Range("J324").Copy
Range("C88").PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range("E225:E263").Copy
Range("l8500").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=True
End If
End Sub

Mike

"dribler" wrote:

i need to place a criteria to enable the macro from stop its execution
if J324=0, then end
----
Sub filldown()
Do
If Range("J324").Formula 0 Then
Range("J324").Copy
Range("C88").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("E225:E263").Copy
Range("l8500").End(xlUp).Offset(1, 0).PasteSpecial
Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
End If
Loop
End Sub
-----
regards,
driller


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default a few adjustment for a do-loop escape

This seems a bit much. Tell us what you have and what you want to do. What
does j324 have to do with it. And, also range c88?

One efficiency below
if range("j324")0 then range("c88").value=range("j324").value



--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"dribler" wrote in message
...
i need to place a criteria to enable the macro from stop its execution
if J324=0, then end
----
Sub filldown()
Do
If Range("J324").Formula 0 Then
Range("J324").Copy
Range("C88").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("E225:E263").Copy
Range("l8500").End(xlUp).Offset(1, 0).PasteSpecial
Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
End If
Loop
End Sub
-----
regards,
driller



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default a few adjustment for a do-loop escape

Don,

J324 is the search formula to obtain the DATA along Column K which is
adjacent to the first un-filled row of L324:AX8616.

J324=IF(ISERROR(INDEX(K324:K8616,MATCH(LOOKUP(2000 00000,L324:L8616,K324:K8616),K324:K8616)+1,1)),K32 4,INDEX(K324:K8616,MATCH(LOOKUP(200000000,L324:L86 16,K324:K8616),K324:K8616)+1,1))

C88 is a data cell *as calculator* for the formulated cells e225:e263

One efficiency below
if range("j324")0 then range("c88").value=range("j324").value


Per your efficiency advise, there appears a compile error "End If without
block If" on adjustment below.
----------
Do
If range("j324")0 then range("c88").value=range("j324").value
Range("E225:E263").Copy
Range("l10000").End(xlUp).Offset(1, 0).PasteSpecial
Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
End If
Loop
End Sub
-------------

The first macro i presented below works yet it will only stop with "Esc".
Problem is i cant see if the rows are completely filled-in when i fully stop
macro exec.
As the subject says, I need to have the "Escape" line on the macro which i
have no any idea where to start.

thanks for your effort and pls advise if you have any more ideas.

regards,
driller

"Don Guillett" wrote:

This seems a bit much. Tell us what you have and what you want to do. What
does j324 have to do with it. And, also range c88?

One efficiency below
if range("j324")0 then range("c88").value=range("j324").value



--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"dribler" wrote in message
...
i need to place a criteria to enable the macro from stop its execution
if J324=0, then end
----
Sub filldown()
Do
If Range("J324").Formula 0 Then
Range("J324").Copy
Range("C88").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("E225:E263").Copy
Range("l8500").End(xlUp).Offset(1, 0).PasteSpecial
Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
End If
Loop
End Sub
-----
regards,
driller






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
Escape key won't work Lee B Excel Discussion (Misc queries) 1 September 3rd 08 05:01 PM
Error handling and escape key Jeff[_54_] Excel Programming 2 April 18th 07 02:13 PM
escape character sam Excel Programming 1 June 7th 04 03:36 PM
using escape key to exit a userform heidi Excel Programming 3 June 4th 04 05:25 PM
How to escape this error message jamesa Excel Programming 1 October 3rd 03 05:50 PM


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