![]() |
checking and copying cells
the sub below does not work. when it goes to the saved records worksheet it
does not go through the records. Worksheets("Saved Records").Activate For Each cell In Worksheets("Saved Records").Range("A2:A102") If cell.Text = name Then ActiveCell.EntireRow.Select Selection.Copy Worksheets("Temporary Record").Activate Worksheets("Temporary Record").Range("B1:B223").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True 'Worksheets("Saved Records").Activate 'ActiveCell.EntireRow.Delete Exit For End If Next cell |
checking and copying cells
Sub tst()
Worksheets("Saved Records").Activate For Each cell In Worksheets("Saved Records").Range("A2:A102") If cell.Value = "name" Then cell.EntireRow.Select Selection.Copy Worksheets("Temporary Record").Activate Worksheets("Temporary Record").Range("B1:B223").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True 'Worksheets("Saved Records").Activate 'cell.EntireRow.Delete ''''''''''Exit For End If Next End Sub |
All times are GMT +1. The time now is 01:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com