#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 269
Default Lookup formula

If you are using Excel 2007 you can use the new IFERROR function. (you dont
have to type the conditions twice)

=IFERROR(IF($D1="ruth baybutt",HLOOKUP(A$3,ruth
baybut!F:N,3,0),HLOOKUP(A$3,sheet2!F:N,3,0)),0)

If you are using 2003 the formula is about as compact as can be.

For both versions, the formula would calculate more quickly if you did not
use whole column references (F:N) and instead limited the lookup to the data
area (i.e. $F$1:$N$400)


--
If this helps, please remember to click yes.


"Michael" wrote:

Hi, I have a lookup that is looking at 2 different worksheet and the formula
is

=IF(ISERROR(IF($D1="ruth baybutt",HLOOKUP(A$3,ruth
baybut!F:N,3,0),HLOOKUP(A$3,sheet2!F:N,3,0))),0,IF ($D1="ruth
baybutt",HLOOKUP(A$3,ruth baybut!F:N,3,0),HLOOKUP(A$3,sheet2!F:N,3,0)))

So the formula is asking if cell D1 = Ruth Baybut then lookup the value on
the ruth baybut sheet otherwise look on sheet2.

Is there a smaller and quicker formula for this please?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 376
Default Lookup formula

Hi

For XL 2003, you could have a more efficient formula by using

=IF(AND($D1="ruth baybutt",Countif(ruth baybut!F:F,A$3)),
HLOOKUP(A$3,ruth baybut!F:N,3,0),HLOOKUP(A$3,sheet2!F:N,3,0))

--
Regards
Roger Govier

Paul C wrote:
If you are using Excel 2007 you can use the new IFERROR function. (you dont
have to type the conditions twice)

=IFERROR(IF($D1="ruth baybutt",HLOOKUP(A$3,ruth
baybut!F:N,3,0),HLOOKUP(A$3,sheet2!F:N,3,0)),0)

If you are using 2003 the formula is about as compact as can be.

For both versions, the formula would calculate more quickly if you did not
use whole column references (F:N) and instead limited the lookup to the data
area (i.e. $F$1:$N$400)


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
Utilizing a RANDBETWEEN() formula within a LOOKUP formula Rich Werk. Excel Discussion (Misc queries) 4 November 4th 09 03:01 AM
Lookup Formula bapeltzer Excel Worksheet Functions 0 February 11th 09 02:29 PM
Lookup Formula Gary''s Student Excel Worksheet Functions 0 February 11th 09 02:28 PM
Lookup Formula - but have a formula if it can't find/match a value Stephen Excel Worksheet Functions 11 June 14th 05 05:32 AM
Lookup formula Esrei Excel Discussion (Misc queries) 1 April 1st 05 02:36 PM


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