#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default lookup help

I have this formula in cell A2
=LOOKUP(B2,{" ",19,50},{" ","1","2"})+A1
if I enter a value in B2 it works fine but if I leave it blank I get an
error that a value is not available.
What I would like is that if there is no value in B2 then A2 would stay
blank.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default lookup help

The way that your formula is written is if B2 is <19 then it returns a space
character. If that condition is ever true then space + A1 will return the
error #VALUE!. If B2 is empty then it returns the error #N/A.

So, try it like this:

=IF(B2<19,"",LOOKUP(B2,{19,50},{1,2})+A1)


--
Biff
Microsoft Excel MVP


wrote in message
...
I have this formula in cell A2
=LOOKUP(B2,{" ",19,50},{" ","1","2"})+A1
if I enter a value in B2 it works fine but if I leave it blank I get an
error that a value is not available.
What I would like is that if there is no value in B2 then A2 would stay
blank.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default lookup help

A few keystrokes shorter...

Assuming B2 is *always* a number (or empty):

=IF(B2<19,"",IF(B2<50,1,2)+A1)


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
The way that your formula is written is if B2 is <19 then it returns a
space character. If that condition is ever true then space + A1 will
return the error #VALUE!. If B2 is empty then it returns the error #N/A.

So, try it like this:

=IF(B2<19,"",LOOKUP(B2,{19,50},{1,2})+A1)


--
Biff
Microsoft Excel MVP


wrote in message
...
I have this formula in cell A2
=LOOKUP(B2,{" ",19,50},{" ","1","2"})+A1
if I enter a value in B2 it works fine but if I leave it blank I get an
error that a value is not available.
What I would like is that if there is no value in B2 then A2 would stay
blank.





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
Get Cell Address From Lookup (Alternative to Lookup) ryguy7272 Excel Worksheet Functions 12 September 28th 07 10:36 PM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 4th 07 12:14 AM
Sumproduct - Condition based on lookup of a Lookup Hari Excel Discussion (Misc queries) 12 May 31st 06 09:28 AM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM
How do I lookup and return different values when the lookup value. kg Excel Discussion (Misc queries) 1 January 20th 05 01:53 AM


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