View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Jim May Jim May is offline
external usenet poster
 
Posts: 430
Default Copy formula automatically down when date is entered

This Sheet Code worked for me..
Note that my example named the LookupRange MyRange, and
I used 3 as my "bring-back" column << You should change
Both these to suit (MyRange & 3)
HTH
Jim May

Private Sub Worksheet_Change(ByVal Target As Range)
If Application.Intersect(Target, Range("B:B")) Is Nothing Then Exit
Sub
If Not Application.Intersect(Target, Range("B:B")) Is Nothing Then
Target.Offset(0, 1).Value = "=Vlookup(" & Target &
",MyRange,3,False)"
End If
End Sub

"tommylux" wrote in message
oups.com:

I would like to apply a formula to the entire column, but this
increases the size of the spreadsheet and also is a bit messy when
printing.

When I enter data into B5 for example, I would like C5 to automatically
enter the vlookup formula I have written.

Any Visual basic commands I could try?

Thanks again guys for your help