Hello I have a code here that will find any bold cells in one sheet and caopy that cell and its row to another sheet (thanks Opus and RobDog888), Well my Co-worker had his friend come up with this code that works as well
..Works Fantastic but there is a problem....It pasted the Data from the Bottom to the top on Worksheet2 (example if it were 3 rows to be pasted...instead of pasting row 1of workshheta to row 1 of worksheet b..it would paste row 1 of A into row 3 of B...kinda upsidedown....)VB Code:
Sub TransferDataPlease() Dim i As Long, n As Long Dim Sh1 As Worksheet, Sh2 As Worksheet Set Sh1 = ActiveSheet Set Sh2 = Worksheets("Results") ' insert name here n = 1 For x = Sh1.Range("A65536").End(xlUp).Row To 3 Step -1 y = 0 IsBold = False Do y = y + 1 If Sh1.Cells(x, y).Font.Bold = True Then IsBold = True Loop While y <= 13 And IsBold = False ' Checks first 13 cols If IsBold Then n = n + 1 Sh1.Range("A" & x).EntireRow.Copy Sh2.Range("A" & n) End If Next x End Sub
.... i think the problem is here.
VB Code:
For x = Sh1.Range("A65536").End(xlUp).Row To 3 Step -1
Because its searching for results from the bottom to the top.But when i try to modify it by flipping the arguments, it tells me that there is an " expected end of statment error"
Can someone help me out here?
thanks for taking a look.




Reply With Quote