Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Can't get HLookup to work in VBA

I can't get this expression

Application.WorksheetFunction.Hlookup(today(),rang e("$C$4:$AA$38"),
35, False)

to work in VBA. I keep getting a 1004 message.

So I've been reduced to the very inelegant method of using this
formula

Range("C1").Formula = "=hlookup(today(),$C$4:$AA$38, 35, False)"

to insert the formula in a cell, then using the Range.Value method to
extract the formula's results.

Any help in getting the first expression to work would be greatly
appreciated, as it's been driving me nuts for most of the afternoon.

TIA.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Can't get HLookup to work in VBA

Hi
try:
Application.WorksheetFunction.Hlookup(date,range(" $C$4:$AA$38"),
35, False)



--
Regards
Frank Kabel
Frankfurt, Germany

"DFStoneJr" schrieb im Newsbeitrag
om...
I can't get this expression

Application.WorksheetFunction.Hlookup(today(),rang e("$C$4:$AA$38"),
35, False)

to work in VBA. I keep getting a 1004 message.

So I've been reduced to the very inelegant method of using this
formula

Range("C1").Formula = "=hlookup(today(),$C$4:$AA$38, 35, False)"

to insert the formula in a cell, then using the Range.Value method to
extract the formula's results.

Any help in getting the first expression to work would be greatly
appreciated, as it's been driving me nuts for most of the afternoon.

TIA.


Reply
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
Vlookup or Hlookup does not work Delya Excel Worksheet Functions 1 March 5th 10 01:28 PM
HLOOKUP GaryLager Excel Discussion (Misc queries) 0 April 26th 07 03:42 PM
hlookup & ? Intermediate Excel User.... Excel Worksheet Functions 4 September 1st 06 12:50 PM
Hlookup? coa01gsb Excel Worksheet Functions 5 March 9th 06 02:03 PM
hlookup #N/A stacyjhaskins Excel Worksheet Functions 2 June 27th 05 09:31 PM


All times are GMT +1. The time now is 01:09 PM.

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

About Us

"It's about Microsoft Excel"