PDA

View Full Version : macro help



Gordon Scott
10-19-2006, 05:25 AM
Hi all. I have been working on this spreadsheet for 2 days now and almost got it perfect except when i put data into row "A20" downwards it shoots down to row 500. Can someone amend my macro to stop this happening please

Cheers

Gordon

Charlize
10-19-2006, 05:43 AM
Add this as the last line of the code in sub PP right before end sub.
ActiveCell.Offset(0, 0).Show
Why do you keep on starting new threads for the same project. If you have a new question the thread will go up in the list.

Charlize

Gordon Scott
10-19-2006, 06:00 AM
Charlize

Thanks very much.

Gordon

Bob Phillips
10-19-2006, 06:04 AM
What is this code trying to do? I put 10 in A22 and it filtered to row 13, then went through all manner of steps changing the colour of the row, before re-instating it all as it was.

BTW, changing cell colour to whit is not a good idea, it formats them and bloats the file. Better to set them to none.



Cells.Range("U2:IV500").Interior.ColorIndex = xlColorindexAutomatic
For Each p In Arr
Sheets(p).Range("A2:T500").ClearContents
Columns("A:A").AutoFilter field:=1, Criteria1:=p
LRw = Cells(Rows.Count, 1).End(xlUp).Row
If LRw > 1 Then
Range(Cells(2, 1), Cells(LRw, 1)).Resize(, 20).Copy Sheets(p).Cells(2, 1)
Sheets(p).Range("A2:T500").Interior.ColorIndex = xlColorindexAutomatic
End If
Next