Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
;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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
-- 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Write macro to lock selected sheet when run | Excel Discussion (Misc queries) | |||
how to write a macro that copies adjustable hyperlinks into a sprd | Excel Discussion (Misc queries) | |||
Write in one cell & copies to another | Excel Discussion (Misc queries) | |||
how to allow macro to write on a protected sheet | Excel Programming | |||
Macro that copies range to new sheet | Excel Programming |