Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default How do I write a macro copies a column to another sheet but that .

I have a column on one spreedsheet with 50 questions. Each question has a
blank cell under it to input comments. I want to copy the only the questions
that have comments (together with the comments) over to another worksheet.
How can I do this with a macro? Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How do I write a macro copies a column to another sheet but that .

;one way is data-filter-autofilter-choose non blanks copy this to some other
cell or some otehr sheet. but the cells where you copy should NOT be in the
same rows as the data.





Husker87 wrote in message
...
I have a column on one spreedsheet with 50 questions. Each question has a
blank cell under it to input comments. I want to copy the only the

questions
that have comments (together with the comments) over to another worksheet.
How can I do this with a macro? Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default How do I write a macro copies a column to another sheet but that .

-- Assuming that your "comments" are just ordinary text (not excel comments
made with InsertComments
-- Assuming that your 50 questions + 50 blank cells are in cells A1 to A100
-- Assuming you want to copy to Sheet2

Sub CopyQuestionAndComments()

Dim i as Integer

For i = 1 to 99 Step 2
If Cells(i,1).Offset(1,0)<"" then
Range(Cells(i,1), Cells(i,1).Offset(1,0).copy _
Destination:=Sheets("Sheet2").Range("A65536").End( xlUp)
End If
Next i

End Sub


"Husker87" wrote:

I have a column on one spreedsheet with 50 questions. Each question has a
blank cell under it to input comments. I want to copy the only the questions
that have comments (together with the comments) over to another worksheet.
How can I do this with a macro? Any ideas?

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
Write macro to lock selected sheet when run office3000 Excel Discussion (Misc queries) 1 October 14th 08 06:49 PM
how to write a macro that copies adjustable hyperlinks into a sprd BROCK8292 Excel Discussion (Misc queries) 3 September 21st 07 06:18 PM
Write in one cell & copies to another slavenp Excel Discussion (Misc queries) 5 August 17th 07 01:52 AM
how to allow macro to write on a protected sheet MVM Excel Programming 0 January 18th 05 05:05 PM
Macro that copies range to new sheet Jeff[_38_] Excel Programming 3 September 29th 04 04:21 AM


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