#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default #N/A Message

For the following array which has been named "test":

1 a
2 b
3 c
4 d
5 e

I wrote the following if and lookup functions in cell A1, "=IF(A2 = " ", "
", VLOOKUP(A2, test, 2, FALSE))". What I want is Cell A1 to return a value
from the "test" array. For example, "a" should be returned when 1 is entered
in A1. Also, I want A1 to be blank when A2 is blank. The vlookup is working
fine but when A2 is blank, A1 is showing "#N/A". Tried everything but nothng
works. Please help.
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default #N/A Message

Your question isn't clear. Where are you entering this formula?

On the one hand you want a to be returned when A1=1, but you also want A1 to
be blank when A2 is blank.

You can't have your cake and eat it too.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Daviv" wrote:

For the following array which has been named "test":

1 a
2 b
3 c
4 d
5 e

I wrote the following if and lookup functions in cell A1, "=IF(A2 = " ", "
", VLOOKUP(A2, test, 2, FALSE))". What I want is Cell A1 to return a value
from the "test" array. For example, "a" should be returned when 1 is entered
in A1. Also, I want A1 to be blank when A2 is blank. The vlookup is working
fine but when A2 is blank, A1 is showing "#N/A". Tried everything but nothng
works. Please help.
Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default #N/A Message

Hi,

Maybe:

=IF(ISNA(VLOOKUP(A2, test, 2, FALSE)),"",VLOOKUP(A2, test, 2, FALSE))

HTH
Jean-Guy


"Daviv" wrote:

For the following array which has been named "test":

1 a
2 b
3 c
4 d
5 e

I wrote the following if and lookup functions in cell A1, "=IF(A2 = " ", "
", VLOOKUP(A2, test, 2, FALSE))". What I want is Cell A1 to return a value
from the "test" array. For example, "a" should be returned when 1 is entered
in A1. Also, I want A1 to be blank when A2 is blank. The vlookup is working
fine but when A2 is blank, A1 is showing "#N/A". Tried everything but nothng
works. Please help.
Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default #N/A Message

Pinmaster,

After I use your formula, both A1 and A2 are blank.

David F

The formula is in Cell A1. When I enter a number in cell A2, say 1, the
formula in A1 should return from the "test" array "a". That's what I am
trying to accomplish with IF(A2 = " ", " ", VLOOKUP(A2, test, 2, FALSE)).
The IF function was added because I wanted A1 to be blank if A2 is blank, if
nothing has been inputted. However, I am getting #N/A.
--
Thanks!


"pinmaster" wrote:

Hi,

Maybe:

=IF(ISNA(VLOOKUP(A2, test, 2, FALSE)),"",VLOOKUP(A2, test, 2, FALSE))

HTH
Jean-Guy


"Daviv" wrote:

For the following array which has been named "test":

1 a
2 b
3 c
4 d
5 e

I wrote the following if and lookup functions in cell A1, "=IF(A2 = " ", "
", VLOOKUP(A2, test, 2, FALSE))". What I want is Cell A1 to return a value
from the "test" array. For example, "a" should be returned when 1 is entered
in A1. Also, I want A1 to be blank when A2 is blank. The vlookup is working
fine but when A2 is blank, A1 is showing "#N/A". Tried everything but nothng
works. Please help.
Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default #N/A Message

Pinmaster,

Your formula works. I entered the wrong array name. You are beautiful!

david
--
Thanks!


"Daviv" wrote:

Pinmaster,

After I use your formula, both A1 and A2 are blank.

David F

The formula is in Cell A1. When I enter a number in cell A2, say 1, the
formula in A1 should return from the "test" array "a". That's what I am
trying to accomplish with IF(A2 = " ", " ", VLOOKUP(A2, test, 2, FALSE)).
The IF function was added because I wanted A1 to be blank if A2 is blank, if
nothing has been inputted. However, I am getting #N/A.
--
Thanks!


"pinmaster" wrote:

Hi,

Maybe:

=IF(ISNA(VLOOKUP(A2, test, 2, FALSE)),"",VLOOKUP(A2, test, 2, FALSE))

HTH
Jean-Guy


"Daviv" wrote:

For the following array which has been named "test":

1 a
2 b
3 c
4 d
5 e

I wrote the following if and lookup functions in cell A1, "=IF(A2 = " ", "
", VLOOKUP(A2, test, 2, FALSE))". What I want is Cell A1 to return a value
from the "test" array. For example, "a" should be returned when 1 is entered
in A1. Also, I want A1 to be blank when A2 is blank. The vlookup is working
fine but when A2 is blank, A1 is showing "#N/A". Tried everything but nothng
works. Please help.
Thanks!

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
Excel 2003 Error Message Marilyn Excel Discussion (Misc queries) 0 December 11th 06 05:22 PM
*How can you post a message to a newgroup from Excel?? SAM SEBAIHI Excel Discussion (Misc queries) 0 December 3rd 06 04:53 AM
File in use error message on a non shared workbook James@ Excel Discussion (Misc queries) 3 November 9th 06 09:27 PM
How do I control where the input message appears? Bernina27 Excel Discussion (Misc queries) 2 September 16th 05 03:04 AM
Calculations And Order In Macros Carl Bowman Excel Discussion (Misc queries) 4 February 23rd 05 10:53 PM


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