LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Find Copy and Paste

I have this:
Private Sub CommandButton1_Click()
Dim lngfindcells As Long 'Set counter up for Sheet1
Dim lngdestcount As Long 'Set counter up for destination cells inSheet2
Dim x As Long

'Set counter = 1 so destination values on Sheet2 begins at row 1
lngdestcount = 1


'Cycle through every cell in Sheet1 column A, starting at row 1
For lngfindcells = 1 To 10


If Worksheets("Master Questions").Cells(lngdestcount, 1) = "" Then
'Do Nothing
Else
'If cell on Sheet1 has a value, copy it and paste it into Sheet2,
beginning in column A, row 1
Worksheets("Master Questions").Range("B" & lngfindcells & ":B" &
lngfindcells).Cells.Find("A").Offset(0, -1).Copy
Destination:=Worksheets("Output").Range("A" & lngdestcount)






'Increment counter so next value copied will be belowprevious one on
Sheet2
lngdestcount = lngdestcount + 1
End If
Next
End Sub


Where Master questions has
Column A with data
Column B with A B or C in the cell as a value

it outputs only the first cell in column B with the value "A" but
doesnt move onto the next cell

Any Ideas?

 
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
VBA Loop to Find then Copy & Paste B J Hankinson Excel Discussion (Misc queries) 0 April 15th 09 06:39 PM
Find Copy and Paste [email protected] New Users to Excel 0 July 3rd 07 02:10 PM
Find, copy and paste ufo_pilot Excel Discussion (Misc queries) 3 September 7th 06 10:34 AM
Find, Copy, Paste to new row Adaliza Excel Programming 0 May 18th 06 12:47 AM


All times are GMT +1. The time now is 03:11 AM.

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"