#1   Report Post  
Trying to excel in life but need help
 
Posts: n/a
Default Vlookup Problem

I have 4 columns of data and two columns where information is entered. All
information is 4 digit # e.g. 2222.

Column A is where the deployment pool numbers are entered
Column B is where items to be repaired are entered

Column C is the source data for the pool numbers.

Column D is the ready pool -waiting to be deployed. This is identical to
column C unless pool numbers are entered in A or B

Column E is the Vlookup Formula for the Deployment Pool Numbers.

Column F is the Vlookup Formula for the Repair Pool Numbers.

I am using this formula. Assuming that all items are in the D Column unless
numbers are enter into A or B then the cell for D column would equal the
value in the adjacent cell in the source C column.


Formula in D is:
=IF(VLOOKUP(A5,C5:C9,1,FALSE),IF(VLOOKUP(B5,C5:C9, 1,FALSE),C5))

Formula in E is:
=VLOOKUP(A5,C5:C9,1,FALSE)

Formula in F is:
=VLOOKUP(B5,C5:C9,1,FALSE)

I am getting and #N/A error when there is not a value in A5 or B5. I want
the value in D5 to be that same as in C5. What am I doing wrong?

Thank you for the help.
Martin

  #2   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"Trying to excel in life but need help"
oft.com wrote in message
...
I have 4 columns of data and two columns where information is entered. All
information is 4 digit # e.g. 2222.

Column A is where the deployment pool numbers are entered
Column B is where items to be repaired are entered

Column C is the source data for the pool numbers.

Column D is the ready pool -waiting to be deployed. This is identical to
column C unless pool numbers are entered in A or B

Column E is the Vlookup Formula for the Deployment Pool Numbers.

Column F is the Vlookup Formula for the Repair Pool Numbers.

I am using this formula. Assuming that all items are in the D Column

unless
numbers are enter into A or B then the cell for D column would equal the
value in the adjacent cell in the source C column.


Formula in D is:
=IF(VLOOKUP(A5,C5:C9,1,FALSE),IF(VLOOKUP(B5,C5:C9, 1,FALSE),C5))

Formula in E is:
=VLOOKUP(A5,C5:C9,1,FALSE)

Formula in F is:
=VLOOKUP(B5,C5:C9,1,FALSE)

I am getting and #N/A error when there is not a value in A5 or B5. I want
the value in D5 to be that same as in C5. What am I doing wrong?

Thank you for the help.
Martin


I think it's a bad idea to use nested vlookup. I have had many problems with
sheets that had these things.

7Fredrik


  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

Since you're working with numbers, my guess is that some of your numbers are
really numbers and some of your numbers are text (masquerading as numbers).

Say you look at your worksheet and you see that A2 "matches" C7 (just by
looking), you can check if they're both numbers with a couple of formulas in
unused cells:


=isnumber(a2)
and
=isnumber(c7)

If they both come back with true or False, then they are the same.

Then try:
=a2=c7

If that comes back as false, then look for trailing spaces in one of the cells.

==
My personal preference is to correct the data in both spots--decide to use Text
numbers or number numbers.

One way to convert Text numbers to number numbers is to select an empty cell,
copy it.
select your offending range and then
edit|paste special|check Add.

I'd do that for both column A and column C to make sure both were really
numbers. (You can give each column a custom format of "0000" to show all 4
digits.)

========
Now some thoughts you didn't ask about.

I like to keep my tables on a dedicated worksheet. It makes inserting/deleting
rows much easier--both in the table and in the "data".

And =vlookup() is usually used to return a value that is in a separate column in
that table (when the key matches).

Excel has another function to test for existance in a single column or row:
=match()

You can use it like:

=if(isnumber(match(a1,sheet2!a:a,0)),"Found it","not found")
or you can check for an error to do the same thing:
=if(iserror(match(a1,sheet2!a:a,0)),"Not found","Found")

You may be able to simplify some of your formulas.



Trying to excel in life but need help wrote:

I have 4 columns of data and two columns where information is entered. All
information is 4 digit # e.g. 2222.

Column A is where the deployment pool numbers are entered
Column B is where items to be repaired are entered

Column C is the source data for the pool numbers.

Column D is the ready pool -waiting to be deployed. This is identical to
column C unless pool numbers are entered in A or B

Column E is the Vlookup Formula for the Deployment Pool Numbers.

Column F is the Vlookup Formula for the Repair Pool Numbers.

I am using this formula. Assuming that all items are in the D Column unless
numbers are enter into A or B then the cell for D column would equal the
value in the adjacent cell in the source C column.

Formula in D is:
=IF(VLOOKUP(A5,C5:C9,1,FALSE),IF(VLOOKUP(B5,C5:C9, 1,FALSE),C5))

Formula in E is:
=VLOOKUP(A5,C5:C9,1,FALSE)

Formula in F is:
=VLOOKUP(B5,C5:C9,1,FALSE)

I am getting and #N/A error when there is not a value in A5 or B5. I want
the value in D5 to be that same as in C5. What am I doing wrong?

Thank you for the help.
Martin


--

Dave Peterson
  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

Can you give an example when you had trouble with nested =vlookup()'s?



Fredrik Wahlgren wrote:

<<snipped

I think it's a bad idea to use nested vlookup. I have had many problems with
sheets that had these things.

7Fredrik


--

Dave Peterson
  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

Ps. Debra Dalgleish has some nice instructions for =vlookup(), =match() and
=index(match()) at:
http://www.contextures.com/xlFunctions02.html
http://www.contextures.com/xlFunctions03.html

Trying to excel in life but need help wrote:

I have 4 columns of data and two columns where information is entered. All
information is 4 digit # e.g. 2222.

Column A is where the deployment pool numbers are entered
Column B is where items to be repaired are entered

Column C is the source data for the pool numbers.

Column D is the ready pool -waiting to be deployed. This is identical to
column C unless pool numbers are entered in A or B

Column E is the Vlookup Formula for the Deployment Pool Numbers.

Column F is the Vlookup Formula for the Repair Pool Numbers.

I am using this formula. Assuming that all items are in the D Column unless
numbers are enter into A or B then the cell for D column would equal the
value in the adjacent cell in the source C column.

Formula in D is:
=IF(VLOOKUP(A5,C5:C9,1,FALSE),IF(VLOOKUP(B5,C5:C9, 1,FALSE),C5))

Formula in E is:
=VLOOKUP(A5,C5:C9,1,FALSE)

Formula in F is:
=VLOOKUP(B5,C5:C9,1,FALSE)

I am getting and #N/A error when there is not a value in A5 or B5. I want
the value in D5 to be that same as in C5. What am I doing wrong?

Thank you for the help.
Martin


--

Dave Peterson


  #6   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"Dave Peterson" wrote in message
...
Can you give an example when you had trouble with nested =vlookup()'s?


I wrote an xll for a company that now has been acquired by Cognos. This is
essentially an add-in written in C/C++. It forced an unconditional
recalcualtion of all functions. On severeal ooccasions, I received workbooks
that didn't recalculate properly. This was particularly true if the user had
created a sheet with nested lookup, hlookup or vlookup functions. If these
functioins were replaced with the values they were meant to return they
worked OK. There was one sheet were I was able to replace the vlookup
function with an if statement and it then worked too. Those at helpdesk were
aware of this so I didn't see all sheets. For some weird reason, these
sheets didn't work if the xll called the CalculateFull command.

/Fredrik


  #7   Report Post  
Dave Peterson
 
Posts: n/a
Default

I've never written a .dll/.xll.

Are you sure that it wasn't your add-in that caused the trouble <gd&r???

(just a joke!)

Fredrik Wahlgren wrote:

"Dave Peterson" wrote in message
...
Can you give an example when you had trouble with nested =vlookup()'s?


I wrote an xll for a company that now has been acquired by Cognos. This is
essentially an add-in written in C/C++. It forced an unconditional
recalcualtion of all functions. On severeal ooccasions, I received workbooks
that didn't recalculate properly. This was particularly true if the user had
created a sheet with nested lookup, hlookup or vlookup functions. If these
functioins were replaced with the values they were meant to return they
worked OK. There was one sheet were I was able to replace the vlookup
function with an if statement and it then worked too. Those at helpdesk were
aware of this so I didn't see all sheets. For some weird reason, these
sheets didn't work if the xll called the CalculateFull command.

/Fredrik


--

Dave Peterson
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
VLOOKUP problem Wazooli Excel Discussion (Misc queries) 5 March 26th 05 01:52 PM
Problem with VLOOKUP and drop-down lists! Vicki Excel Worksheet Functions 2 March 18th 05 10:52 PM
VLOOKUP, OFFSET, MATCH PROBLEM, HELP? Steve Excel Worksheet Functions 0 January 30th 05 09:11 PM
VLOOKUP problem Jason Excel Worksheet Functions 2 January 14th 05 10:39 PM
Vlookup Function Problem Parker Excel Worksheet Functions 3 January 13th 05 06:53 PM


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