PDA

View Full Version : copy rows to worksheet two and PDF to print



specops
05-29-2009, 05:36 AM
Can anyone help i need to the information with a score 1,2, or 3 which turn red or orange on the attached spreadsheet to workbook 2. (The information to be copied is highlighted in yellow to help explain whats required, it would not normally be coloured)

lucas
05-29-2009, 07:34 AM
Do you mean sheet 2? We have seen this workbook before. What happened to the code we provided the first time you asked this question here?

specops
05-29-2009, 08:27 AM
Yes i do mean worksheet 2. Yes you have seen this before but there was problems with the merged cells so i have taken them out and reconfigured the layout. The last code copied the rows in reverse order onto worksheet two which was confusing because worksheet2 will be a summary report.

lucas
05-29-2009, 09:09 AM
I can get it to copy the rows if it has a 1 2 or 3 but the order is a problem we addressed before. You can't add an indexing column to sort by?

specops
05-29-2009, 09:45 AM
what about if we add a hidden cell for each question row and give it a number i.e 1-40 then add some code that "sort decending" these on worksheet 2 before delecting the column containing the index number.

mdmackillop
05-29-2009, 09:46 AM
Sub Test()
Range("D18:D100").AutoFilter Field:=1, Criteria1:=">0", Operator:=xlAnd, Criteria2:="<4"
Range("D18:D100").SpecialCells(xlCellTypeVisible).EntireRow.Copy Sheets(2).Cells(1, 1)
Range("D18:D100").AutoFilter
End Sub

specops
05-29-2009, 10:41 AM
i attached an example of the spreadsheet in the initial post

mdmackillop
05-29-2009, 11:08 AM
:think: