LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default How to use the worksheetfunction Vlookup

Hi----this is part of a much larger program, that I am testing
separately, if you are wondering what the heck I would use it
for. :)

I am trying to use the worksheet function vlookup in my code but it
keeps telling me

'unable to use the worksheet function vlookup class' when it gets to
that point in the code...

any idea how I should code this differently to make it work??

Thanks...


Sub makedayofweek()
Dim RANGEENTRIES As Range, NUMENTRIES As Integer, Mydate As Range,
Test As Range



Range("B22").Select

Set RANGEENTRIES = Range("B22", ActiveCell.End(xlToRight))
RANGEENTRIES.Select
NUMENTRIES = RANGEENTRIES.Columns.Count
Range("B12").Select

For i = 1 To NUMENTRIES
Set WDAY = ActiveCell
WDAY.Select
ActiveCell =
Application.WorksheetFunction.Weekday(ActiveCell.O ffset(10, 0), 2)
ActiveCell.Offset(0, 1).Select
Next i

Set Test = ActiveCell.Offset(1, 0)


Range("B11").Select
For i = 1 To NUMENTRIES
Set Mydate = ActiveCell
Mydate.Value = Application.WorksheetFunction.VLookup(Test,
Range("E53:E59"), 2)
Mydate.Offset(0, 1).Select
Next i



End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
WorksheetFunction.Vlookup leerem Excel Discussion (Misc queries) 8 October 25th 08 07:58 PM
worksheetfunction.vlookup in vba pmoon7 Excel Programming 4 January 25th 06 09:00 PM
Worksheetfunction.Vlookup Robert Wilcox Excel Programming 1 May 14th 05 05:00 AM
vlookup worksheetfunction ben Excel Programming 4 February 15th 05 10:27 PM
worksheetfunction.vlookup? devnext Excel Programming 1 October 29th 03 06:41 PM


All times are GMT +1. The time now is 10:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"