Hi All,
I am having trouble finding a code to copy certain cells into a row based on the date in column A.
I have the below coding to input data from "front Sht" to "time":
Sub Insert()
Application.ScreenUpdating = False
C = Range("M23")
H = Range("M25")
A = Range("M27")
Worksheets("Hours").Select
ActiveSheet.Range("H1").Select
RowCount = ActiveSheet.Range("H1").CurrentRegion.Rows.Count
With ActiveSheet.Range("H1")
.Offset(RowCount, 1) = C
.Offset(RowCount, 2) = H
.Offset(RowCount, 3) = A
End With
End Sub
Sub Search_Name()
Application.ScreenUpdating = False
Dim Name As String
C = Range("M23")
H = Range("M25")
A = Range("M27")
Name = Range("M21")
Worksheets("time").Select
For i = 1 To 50
Columns(i).Select
If ActiveCell = Name Then
x = ActiveCell
ActiveCell.Offset(1, 0).Select
ActiveSheet.Columns(i).Select
RowCount = ActiveSheet.Columns(i).CurrentRegion.Rows.Count
With ActiveCell
.Offset(RowCount, 1) = C
.Offset(RowCount, 2) = H
.Offset(RowCount, 3) = A
End With
Else: End If
Next i
Worksheets("Front Sht").Select
End Sub
I am looking to add coding to the beginning of the code to only insert the data into the specific row in which relates to the date in column A (sheet "time").
any suggestions would be appreciated.
thanks
Bookmarks