View Single Post
  #1   Report Post  
Dennis
 
Posts: n/a
Default Inserting Filtered RC cell information into other worksheets

Unsing 2003

Created a macro to add then copy/past cell info from one worksheet to a
series of other new worksheets. Works fine.

The reason for the macro was to automate the process of adding a worksheet
(which is limited to the 255 character limit) then copy/paste cells so as to
overcome the 255/per cell limitation.

Now I have a new series of worksheets "A 1 thru 10".

I would like to populate the cells of the new worksheets with certain cells
existing on another worksheet, Named "B", which has filtered data.

Thus worksheet A1 has 10 cells (in a different layout on W/S "B"). I want
to populate A1 then, A2, A3 .... etc., with cells from W/S "B" where the
"Visible Rows" may be
Row 3 next 7 next 20, next 57.

So A1 is populated with W/S "B" Row 3 information
A2 is populated with W/S "B" Row 7 info
A3 is populated with W/S "B" Row 20 info (and so on)

I am not sure how to cause a VBA loop to skip through W/S "B" visible rows,
populate the various "A" series W/S and then stop when the last visible row
on "B" is encountered.

So I need a counter? that increments non-sequentially?
knows how many "A" W/S to populate and stops when all visible row
information is completed.

Not sure whether to use .Offset() or what ever.

Any help would be appreciated.

Dennis

BTW the macro so far is:

Sub WorkSheetCopy()
'
'
' Assumes that the ActiveSheet is the Copy-from Worksheet
'
'
'
' Keyboard Shortcut: Ctrl+Shift+W
'
'
Dim WorkSheetNumber As Long
Dim OrigWorkSheetName As String
ActiveSheet.Select
OrigWorkSheetName = ActiveSheet.Name
ActiveSheet.Copy After:=ActiveWorkbook.Worksheets _
(ActiveWorkbook.Sheets.count)
WorkSheetNumber = ActiveWorkbook.Sheets.count
Sheets(OrigWorkSheetName).Select
Cells.Select
Selection.Copy
Sheets(WorkSheetNumber).Select
Cells.Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A1").Select
Sheets(OrigWorkSheetName).Select
Range("A1").Select
End Sub