Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Vba Problem

Hi
I have a macro that does almost what i want, but it misses me some detail.
The objective is to copy to other sheet some data, but this formula makes
two things i cant control, it duplies information if i click 2 times macro
button, and it goes to First row in the sheet i want.
I would like to control this 2 elements. How can i?
Thanks

Sub Ferias2()
For i = 7 To Cells(Rows.Count, "A").End(xlUp).Row
If Cells(i, "A").Value = "1" Then
With Worksheets("1")
nextrow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
End With
Cells(i, "C").Resize(, 36).Copy Worksheets("1").Range("A" &
nextrow)

End If
next i

End Sub
 
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
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
problem with a conditional max problem Brian Cornejo Excel Discussion (Misc queries) 1 February 18th 05 06:25 PM


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