Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jo Jo is offline
external usenet poster
 
Posts: 113
Default lookup within an IF formula

I want to enter a function that in cell B15 will display an empty cell if A15
is blank but otherwise looks up information from a named range in another
worksheet. I've got as far as clicking into B15 and putting in
=if(A15,"","",=vlookup(

The range is on a worksheet called "items" as follows:
A3 B3 C3 D3 E3 F3
D001 Dijon Wall Unit Vanilla Gloss 300 £137.99

Jo
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default lookup within an IF formula

looks up information from a named range in another worksheet

Try something like this:

=IF(A15="","",VLOOKUP(A15,named_range,column_index _number,0))

--
Biff
Microsoft Excel MVP


"Jo" wrote in message
...
I want to enter a function that in cell B15 will display an empty cell if
A15
is blank but otherwise looks up information from a named range in another
worksheet. I've got as far as clicking into B15 and putting in
=if(A15,"","",=vlookup(

The range is on a worksheet called "items" as follows:
A3 B3 C3 D3 E3 F3
D001 Dijon Wall Unit Vanilla Gloss 300 £137.99

Jo



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 154
Default lookup within an IF formula

Jo,

Remove the =vlookup and place VLOOKUP, also place the qualifier on the
variable for your IF, where A15 = "".

The IF format is:
IF(<qualifying response,<if true,<if false)

The VLOOKUP format is:
VLOOKUP(<value,<range,<column number,<true/false)

So:
=if(A15="","",vlookup(.....))

--
--Thomas [PBD]
Working hard to make working easy.
Answered your question? Click ''Yes'' below.


"Jo" wrote:

I want to enter a function that in cell B15 will display an empty cell if A15
is blank but otherwise looks up information from a named range in another
worksheet. I've got as far as clicking into B15 and putting in
=if(A15,"","",=vlookup(

The range is on a worksheet called "items" as follows:
A3 B3 C3 D3 E3 F3
D001 Dijon Wall Unit Vanilla Gloss 300 £137.99

Jo

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default lookup within an IF formula

You don't explain what data you want to return, so I'll assume that
you want all of it if there is a match. So, in B15 you can continue
with your formula:

=IF($A15="","",IF(ISNA(MATCH($A15,items!$A:$A,
0)),"absent",VLOOKUP($A15,items!$A:$F,COLUMN(B$1), 0)))

then you can copy this formula into C15:F15 to return all the data
associated with the code that you enter in A15. You can change
"absent" to "" or some other message if you like.

Hope this helps.

Pete

On Oct 8, 6:45*pm, Jo wrote:
I want to enter a function that in cell B15 will display an empty cell if A15
is blank but otherwise looks up information from a named range in another
worksheet. I've got as far as clicking into B15 and putting in
=if(A15,"","",=vlookup(

The range is on a worksheet called "items" as follows:
A3 * * B3 * * * C3 * * * * * *D3 * * * * * * * *E3 * * *F3
D001 Dijon * * * * Wall Unit * * * Vanilla Gloss *300 * £137.99

Jo


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
Lookup formula? Kelly Excel Worksheet Functions 2 July 31st 08 06:43 PM
Lookup Formula Bernadette Excel Discussion (Misc queries) 3 December 16th 07 07:18 PM
Lookup formula Rowland Excel Worksheet Functions 2 February 1st 07 03:29 PM
Lookup formula? tmerton Excel Discussion (Misc queries) 1 May 2nd 06 02:49 AM
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


All times are GMT +1. The time now is 09:16 AM.

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"