View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Sheet automatically condenses data??

view = toolbars, select the forms toolbar. Then click on the button icon
on the forms toolbar and

drag a button to your sheet.

assign the macro to it.

--
Regards,
Tom Ogilvy

"gocush" /delete wrote in message
...
Without knowing the layout of your two sheets you may be able to adapt the
following:
Assume the check list is on Sheet2 and your "Master-list" is on Sheet1
Assume Sheet2 Col A is where the user marks (in some way - say T/F , "X"

or
whatever) that s/he wants to choose the item in Col B.
Assume you have a Cmd Button on Sheet2 that the user clicks after

completing
the selections.

The code behind this Cmd Button would be something like:

Sub CopySelectionsToSheet1()
Dim oCell as Range
dim CkRng as Range
Dim NewRowCell as Range

Set CkRng = Sheets("Sheet2").Range("A2:A500") ' adj to wherever the
check marks may be
Set NewRowCell =
Sheets("Sheet1").cells(Rows.Count,1).End(xlUp).Off set(1,0)

For each oCell in CkRng
If oCell.Value = "X" Then 'adj to your checkmark
oCell.Copy NewRowCell
Set NewRowCell = NewRowCell.Offset(1,0)
End IF
Next oCell
Set NewRowCell=Nothing
Set oCell=Nothing
Set CkRng = Nothing
End Sub
"erikeve" wrote:

I want items that are brought over from a checklist on another sheet to
automatically condense togethor so that there are no blank rows in

between.
Is this possible??