Vlookup

N

NM

Hi,
I have projects in Rows and I have column with dates of projects.When I
enter a date in column B for any row, I want the data in the row to be pulled
in a different sheet.
For instance: There are 120 rows,Column B has dates for them.Some may have
date some may not. when I enter a date in column B I want the data of just
that row From B2 to BQ2 to be pulled in a different sheet.

Is there a way to do this. Please help me.
Thanks much!
 
S

Sheeloo

Try the following macro (and tweak it according to your need)
(Right-click on the source sheet, select view code and paste the macro)
It will copy the currnet row if anything is entered in Col B
You may like to add a check for date..

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Answer As String
Dim LastRowOnSheet2 As Long
If Target.Column = 2 Then
With Worksheets("Sheet2")
LastRowOnSheet2 = .Cells(.Rows.Count, "B").End(xlUp).Row
If LastRowOnSheet2 = 1 And .Cells(1, "B").Value = "" Then
LastRowOnSheet2 = 0
End If
Selection.Offset(-1, 0).EntireRow. _
Copy .Range("A" & (LastRowOnSheet2 + 1))
End With
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top