LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBA Function to evaluate hlookup text string as formula

Tom,
I made the change, but it now displays the text I pass to it.

Maybe I should just take a step back and ask if there an easier way to
put together an hlookup based upon concatenating dynamic text strings
that refer to an array in another closed spreadsheet. I've tried using
Indirect, but it has the same problem.

Thanks!
Eric

"Tom Ogilvy" wrote in message ...
Evaluate won't work with a closed workbook, so that is why your A14 is
failing.

In A15, Excel evaluates the argument to myfunct before passing it to
myfunct, so it gets the results from the look up and passes it as a string
to Myfunct which does nothing to it and returns it.

change

Public Function myFunct(InputString As String)
myFunct = Application.Evaluate("=" & InputString)
End Function

to

Public Function myFunct(InputString As String)
myFunct = InputString
End Function

and you will see the difference.

--
Regards,
Tom Ogilvy

 
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
Is there a function that will evaluate a text string in a cell? Dave Excel Worksheet Functions 2 October 7th 09 04:25 AM
Function to evaluate function as string Basil Excel Worksheet Functions 3 September 18th 09 10:43 AM
Evaluate text string as a function benb Excel Discussion (Misc queries) 3 July 19th 06 02:41 PM
Evaluate string as a formula peacelittleone Excel Worksheet Functions 3 June 26th 05 06:20 PM
how to evaluate the content of a string as if it was a formula cyrille de brébisson Excel Discussion (Misc queries) 5 December 6th 04 10:47 PM


All times are GMT +1. The time now is 12:00 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"