Thread: Vlookup
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default Vlookup

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


"NM" wrote:


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!