Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formulae and cpu

Status
Not open for further replies.

christhedonstar

Programmer
Apr 9, 2007
215
GB
Hi

If I do this formula:

if(A1=A2, "OK", Vlookup(C1, myRange, 2, 0))

If A1=B1 will the vlookup part still calculate? I want to minimise calculation time hence why I'm doing the first check. But I thought I'd double check with you experts!


Thanks,

Chris
 
Hi,

"If A1=B1 will the vlookup part still calculate? "

Where did B1 come from?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
No. The calculation taking place: is A1 = A2? If not, A1=B1, then the process kicks out without the vlookup function activating.

Regards
Peter Buitenhek
ProfitDeveloper.com

"Never settle for a job well done...always look for cost cutting measures
 
if(A1=A2, "OK", Vlookup(C1, myRange, 2, 0))

...and to be more specific, what do A1 or A2 have anything to do with knowing if C1 appears in myRange?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
If your condition is true then Excel won't try to evaluate the vlookup.

A thought: do you need the lookup formula to be active all the time or could you calculate it once and then convert the results to values? I do this all the time (keeping one copy of the formula for next time I need to re-do the lookup). I have a generic bit of VBA that I use to help this process.

Gavin
 
OK thanks

Example probably should have read
if(A1=A2, "OK", Vlookup(A2, myRange, 2, 0))

And myRange has OKs or NOT OKs...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top