Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Can VLOOKUP return a formula??

You could, with a little help from VB. Open up the VBE (Alt+F11), goto Insert
- Module, and paste this in:

'==========
Function EvalFormula(FormulaCell As String)
EvalFormula = Evaluate(FormulaCell)
End Function
'==========

Now, back in your workbook, you can setup your VLOOKUP table, and then your
formula will be something like:

=EvalFormula(VLOOKUP(formulaGoesHere))

EvalFormula will treat whatever is returned from the VLOOKUP as if it's an
actual formula.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Iriemon" wrote:

Can a VLOOKUP return a formula rather than a value?

If not, is there any function that will return a formula?

I have a spreadsheet where depending on certain criteria, I need to use a
different formula. Unfortunately, I have 58 "rules" (criteria) I need to test
for to determine which formula to utilize. Right now I am performing
calculations for all 58 rules in a table on a separate worksheet and then
using a macro to bring in each part number, perform the calculations, do a
VLOOKUP and then return the correct result to the master worksheet. With
17,000 + rows, it is taking a bit of time to do.

Any suggestions on how to speed this up would be great!

Irie!


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
Can VLOOKUP return a formula?? JP Ronse Excel Worksheet Functions 0 August 17th 09 03:13 PM
Can VLOOKUP return a formula?? NBVC[_166_] Excel Worksheet Functions 0 August 17th 09 01:55 PM
How do I use vlookup to return a formula not a result G Sedgwick Excel Worksheet Functions 1 May 5th 09 03:05 PM
Return a working formula from a Vlookup Mr Machine Excel Worksheet Functions 3 March 26th 09 11:42 AM
VLOOKUP and return formula JE Excel Worksheet Functions 2 February 8th 09 11:53 PM


All times are GMT +1. The time now is 04:30 AM.

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"