#1   Report Post  
Posted to microsoft.public.excel.misc
pm pm is offline
external usenet poster
 
Posts: 122
Default table lookup

Still struggling with my lookup formula. The table below is an example of
what I am trying to accomplish. I am getting inconsistent results. I
concatenated column H, and I into L. My goal is to find the vendor match in
the table with column L. And if it matches populate column J with the
corresponding Location from the table in column D. I am using the following
formula in J: =LOOKUP(L3,C$1:D$321,D$1:D$321). In this example the 1st and
2nd row pulled the right location. But in the 3rd row it pulled the wrong
location - from the row above. I appreciate any help!


H I J L
999050539 FORT BEND COUNTY JP#2 LOC1 999050539FORT BEND COUNTY JP#2
999120266 JIM WELLS COUNTY JP1 LOC2 999120266JIM WELLS COUNTY JP1
999075446 JP 1 WILLIAMSON COUNTY LO16 999075446JP 1 WILLIAMSON COUNTY

Vendor Table:
C
D
999050539FORT BEND COUNTY JP#2 LOC1
999120266JIM WELLS COUNTY JP1 LOC1
999074481MONTGOMERY JP #5 LO16
999075446JP 1 WILLIAMSON COUNTY LOC4








  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default table lookup

LOOKUP requires your table (col L) to be sorted ascending.
Use VLLOKUP instead. Look here for a tutorial:

http://www.contextures.com/xlFunctions02.html

Pay special attention to the 4th argument of VLOOKUP; don't omit it.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"pm" wrote in message ...
| Still struggling with my lookup formula. The table below is an example of
| what I am trying to accomplish. I am getting inconsistent results. I
| concatenated column H, and I into L. My goal is to find the vendor match in
| the table with column L. And if it matches populate column J with the
| corresponding Location from the table in column D. I am using the following
| formula in J: =LOOKUP(L3,C$1:D$321,D$1:D$321). In this example the 1st and
| 2nd row pulled the right location. But in the 3rd row it pulled the wrong
| location - from the row above. I appreciate any help!
|
|
| H I J L
| 999050539 FORT BEND COUNTY JP#2 LOC1 999050539FORT BEND COUNTY JP#2
| 999120266 JIM WELLS COUNTY JP1 LOC2 999120266JIM WELLS COUNTY JP1
| 999075446 JP 1 WILLIAMSON COUNTY LO16 999075446JP 1 WILLIAMSON COUNTY
|
| Vendor Table:
| C
| D
| 999050539FORT BEND COUNTY JP#2 LOC1
| 999120266JIM WELLS COUNTY JP1 LOC1
| 999074481MONTGOMERY JP #5 LO16
| 999075446JP 1 WILLIAMSON COUNTY LOC4
|
|
|
|
|
|
|
|


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default table lookup

As suggested change to
"=VLOOKUP(L3,C$1:D$321,2,FALSE)"

"Niek Otten" wrote:

LOOKUP requires your table (col L) to be sorted ascending.
Use VLLOKUP instead. Look here for a tutorial:

http://www.contextures.com/xlFunctions02.html

Pay special attention to the 4th argument of VLOOKUP; don't omit it.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"pm" wrote in message ...
| Still struggling with my lookup formula. The table below is an example of
| what I am trying to accomplish. I am getting inconsistent results. I
| concatenated column H, and I into L. My goal is to find the vendor match in
| the table with column L. And if it matches populate column J with the
| corresponding Location from the table in column D. I am using the following
| formula in J: =LOOKUP(L3,C$1:D$321,D$1:D$321). In this example the 1st and
| 2nd row pulled the right location. But in the 3rd row it pulled the wrong
| location - from the row above. I appreciate any help!
|
|
| H I J L
| 999050539 FORT BEND COUNTY JP#2 LOC1 999050539FORT BEND COUNTY JP#2
| 999120266 JIM WELLS COUNTY JP1 LOC2 999120266JIM WELLS COUNTY JP1
| 999075446 JP 1 WILLIAMSON COUNTY LO16 999075446JP 1 WILLIAMSON COUNTY
|
| Vendor Table:
| C
| D
| 999050539FORT BEND COUNTY JP#2 LOC1
| 999120266JIM WELLS COUNTY JP1 LOC1
| 999074481MONTGOMERY JP #5 LO16
| 999075446JP 1 WILLIAMSON COUNTY LOC4
|
|
|
|
|
|
|
|



  #4   Report Post  
Posted to microsoft.public.excel.misc
pm pm is offline
external usenet poster
 
Posts: 122
Default table lookup

Hey Markus,

Thanks for the suggestion. I am now getting #N/A in my location field...any
suggestions?

"Markus Fischer" wrote:

As suggested change to
"=VLOOKUP(L3,C$1:D$321,2,FALSE)"

"Niek Otten" wrote:

LOOKUP requires your table (col L) to be sorted ascending.
Use VLLOKUP instead. Look here for a tutorial:

http://www.contextures.com/xlFunctions02.html

Pay special attention to the 4th argument of VLOOKUP; don't omit it.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"pm" wrote in message ...
| Still struggling with my lookup formula. The table below is an example of
| what I am trying to accomplish. I am getting inconsistent results. I
| concatenated column H, and I into L. My goal is to find the vendor match in
| the table with column L. And if it matches populate column J with the
| corresponding Location from the table in column D. I am using the following
| formula in J: =LOOKUP(L3,C$1:D$321,D$1:D$321). In this example the 1st and
| 2nd row pulled the right location. But in the 3rd row it pulled the wrong
| location - from the row above. I appreciate any help!
|
|
| H I J L
| 999050539 FORT BEND COUNTY JP#2 LOC1 999050539FORT BEND COUNTY JP#2
| 999120266 JIM WELLS COUNTY JP1 LOC2 999120266JIM WELLS COUNTY JP1
| 999075446 JP 1 WILLIAMSON COUNTY LO16 999075446JP 1 WILLIAMSON COUNTY
|
| Vendor Table:
| C
| D
| 999050539FORT BEND COUNTY JP#2 LOC1
| 999120266JIM WELLS COUNTY JP1 LOC1
| 999074481MONTGOMERY JP #5 LO16
| 999075446JP 1 WILLIAMSON COUNTY LOC4
|
|
|
|
|
|
|
|



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default table lookup

Are your records starting at line 1? If not you might want to adjut the
C$1:D$321 part of the formula. Column D should contain the locations and
column L the formula.

Let me know if it works.

"pm" wrote:

Hey Markus,

Thanks for the suggestion. I am now getting #N/A in my location field...any
suggestions?

"Markus Fischer" wrote:

As suggested change to
"=VLOOKUP(L3,C$1:D$321,2,FALSE)"

"Niek Otten" wrote:

LOOKUP requires your table (col L) to be sorted ascending.
Use VLLOKUP instead. Look here for a tutorial:

http://www.contextures.com/xlFunctions02.html

Pay special attention to the 4th argument of VLOOKUP; don't omit it.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"pm" wrote in message ...
| Still struggling with my lookup formula. The table below is an example of
| what I am trying to accomplish. I am getting inconsistent results. I
| concatenated column H, and I into L. My goal is to find the vendor match in
| the table with column L. And if it matches populate column J with the
| corresponding Location from the table in column D. I am using the following
| formula in J: =LOOKUP(L3,C$1:D$321,D$1:D$321). In this example the 1st and
| 2nd row pulled the right location. But in the 3rd row it pulled the wrong
| location - from the row above. I appreciate any help!
|
|
| H I J L
| 999050539 FORT BEND COUNTY JP#2 LOC1 999050539FORT BEND COUNTY JP#2
| 999120266 JIM WELLS COUNTY JP1 LOC2 999120266JIM WELLS COUNTY JP1
| 999075446 JP 1 WILLIAMSON COUNTY LO16 999075446JP 1 WILLIAMSON COUNTY
|
| Vendor Table:
| C
| D
| 999050539FORT BEND COUNTY JP#2 LOC1
| 999120266JIM WELLS COUNTY JP1 LOC1
| 999074481MONTGOMERY JP #5 LO16
| 999075446JP 1 WILLIAMSON COUNTY LOC4
|
|
|
|
|
|
|
|





  #6   Report Post  
Posted to microsoft.public.excel.misc
pm pm is offline
external usenet poster
 
Posts: 122
Default table lookup

My first record starts at line 2, so I changed the formula to C$2:D$321.
Column D = locations and column L = formula.....results are still #NA

"Markus Fischer" wrote:

Are your records starting at line 1? If not you might want to adjut the
C$1:D$321 part of the formula. Column D should contain the locations and
column L the formula.

Let me know if it works.

"pm" wrote:

Hey Markus,

Thanks for the suggestion. I am now getting #N/A in my location field...any
suggestions?

"Markus Fischer" wrote:

As suggested change to
"=VLOOKUP(L3,C$1:D$321,2,FALSE)"

"Niek Otten" wrote:

LOOKUP requires your table (col L) to be sorted ascending.
Use VLLOKUP instead. Look here for a tutorial:

http://www.contextures.com/xlFunctions02.html

Pay special attention to the 4th argument of VLOOKUP; don't omit it.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"pm" wrote in message ...
| Still struggling with my lookup formula. The table below is an example of
| what I am trying to accomplish. I am getting inconsistent results. I
| concatenated column H, and I into L. My goal is to find the vendor match in
| the table with column L. And if it matches populate column J with the
| corresponding Location from the table in column D. I am using the following
| formula in J: =LOOKUP(L3,C$1:D$321,D$1:D$321). In this example the 1st and
| 2nd row pulled the right location. But in the 3rd row it pulled the wrong
| location - from the row above. I appreciate any help!
|
|
| H I J L
| 999050539 FORT BEND COUNTY JP#2 LOC1 999050539FORT BEND COUNTY JP#2
| 999120266 JIM WELLS COUNTY JP1 LOC2 999120266JIM WELLS COUNTY JP1
| 999075446 JP 1 WILLIAMSON COUNTY LO16 999075446JP 1 WILLIAMSON COUNTY
|
| Vendor Table:
| C
| D
| 999050539FORT BEND COUNTY JP#2 LOC1
| 999120266JIM WELLS COUNTY JP1 LOC1
| 999074481MONTGOMERY JP #5 LO16
| 999075446JP 1 WILLIAMSON COUNTY LOC4
|
|
|
|
|
|
|
|



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default table lookup

Where do you records start in colum H:L?

Basically on cell J2 it should be :
=VLOOKUP(L2,C$1:D$321,2,FALSE)
cell J3:
=VLOOKUP(L3,C$1:D$321,2,FALSE)

And so on...


"pm" wrote:

My first record starts at line 2, so I changed the formula to C$2:D$321.
Column D = locations and column L = formula.....results are still #NA

"Markus Fischer" wrote:

Are your records starting at line 1? If not you might want to adjut the
C$1:D$321 part of the formula. Column D should contain the locations and
column L the formula.

Let me know if it works.

"pm" wrote:

Hey Markus,

Thanks for the suggestion. I am now getting #N/A in my location field...any
suggestions?

"Markus Fischer" wrote:

As suggested change to
"=VLOOKUP(L3,C$1:D$321,2,FALSE)"

"Niek Otten" wrote:

LOOKUP requires your table (col L) to be sorted ascending.
Use VLLOKUP instead. Look here for a tutorial:

http://www.contextures.com/xlFunctions02.html

Pay special attention to the 4th argument of VLOOKUP; don't omit it.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"pm" wrote in message ...
| Still struggling with my lookup formula. The table below is an example of
| what I am trying to accomplish. I am getting inconsistent results. I
| concatenated column H, and I into L. My goal is to find the vendor match in
| the table with column L. And if it matches populate column J with the
| corresponding Location from the table in column D. I am using the following
| formula in J: =LOOKUP(L3,C$1:D$321,D$1:D$321). In this example the 1st and
| 2nd row pulled the right location. But in the 3rd row it pulled the wrong
| location - from the row above. I appreciate any help!
|
|
| H I J L
| 999050539 FORT BEND COUNTY JP#2 LOC1 999050539FORT BEND COUNTY JP#2
| 999120266 JIM WELLS COUNTY JP1 LOC2 999120266JIM WELLS COUNTY JP1
| 999075446 JP 1 WILLIAMSON COUNTY LO16 999075446JP 1 WILLIAMSON COUNTY
|
| Vendor Table:
| C
| D
| 999050539FORT BEND COUNTY JP#2 LOC1
| 999120266JIM WELLS COUNTY JP1 LOC1
| 999074481MONTGOMERY JP #5 LO16
| 999075446JP 1 WILLIAMSON COUNTY LOC4
|
|
|
|
|
|
|
|



  #8   Report Post  
Posted to microsoft.public.excel.misc
pm pm is offline
external usenet poster
 
Posts: 122
Default table lookup

Start on row 2 - formula as follows:

=VLOOKUP(L2,C$2:D$321,2,FALSE)
=VLOOKUP(L3,C$2:D$321,2,FALSE)
=VLOOKUP(L4,C$2:D$321,2,FALSE)

Could it be a formatting issue? formatted as General. thanks.

"Markus Fischer" wrote:

Where do you records start in colum H:L?

Basically on cell J2 it should be :
=VLOOKUP(L2,C$1:D$321,2,FALSE)
cell J3:
=VLOOKUP(L3,C$1:D$321,2,FALSE)

And so on...


"pm" wrote:

My first record starts at line 2, so I changed the formula to C$2:D$321.
Column D = locations and column L = formula.....results are still #NA

"Markus Fischer" wrote:

Are your records starting at line 1? If not you might want to adjut the
C$1:D$321 part of the formula. Column D should contain the locations and
column L the formula.

Let me know if it works.

"pm" wrote:

Hey Markus,

Thanks for the suggestion. I am now getting #N/A in my location field...any
suggestions?

"Markus Fischer" wrote:

As suggested change to
"=VLOOKUP(L3,C$1:D$321,2,FALSE)"

"Niek Otten" wrote:

LOOKUP requires your table (col L) to be sorted ascending.
Use VLLOKUP instead. Look here for a tutorial:

http://www.contextures.com/xlFunctions02.html

Pay special attention to the 4th argument of VLOOKUP; don't omit it.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"pm" wrote in message ...
| Still struggling with my lookup formula. The table below is an example of
| what I am trying to accomplish. I am getting inconsistent results. I
| concatenated column H, and I into L. My goal is to find the vendor match in
| the table with column L. And if it matches populate column J with the
| corresponding Location from the table in column D. I am using the following
| formula in J: =LOOKUP(L3,C$1:D$321,D$1:D$321). In this example the 1st and
| 2nd row pulled the right location. But in the 3rd row it pulled the wrong
| location - from the row above. I appreciate any help!
|
|
| H I J L
| 999050539 FORT BEND COUNTY JP#2 LOC1 999050539FORT BEND COUNTY JP#2
| 999120266 JIM WELLS COUNTY JP1 LOC2 999120266JIM WELLS COUNTY JP1
| 999075446 JP 1 WILLIAMSON COUNTY LO16 999075446JP 1 WILLIAMSON COUNTY
|
| Vendor Table:
| C
| D
| 999050539FORT BEND COUNTY JP#2 LOC1
| 999120266JIM WELLS COUNTY JP1 LOC1
| 999074481MONTGOMERY JP #5 LO16
| 999075446JP 1 WILLIAMSON COUNTY LOC4
|
|
|
|
|
|
|
|



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default table lookup

Could you check that the strings you are comparing are exactly the same? You
would get N/A if for instance one of them had a space at the end and the
other not.

In that case, use the TRIM function to remove unnecessary spaces.

"pm" wrote:

Start on row 2 - formula as follows:

=VLOOKUP(L2,C$2:D$321,2,FALSE)
=VLOOKUP(L3,C$2:D$321,2,FALSE)
=VLOOKUP(L4,C$2:D$321,2,FALSE)

Could it be a formatting issue? formatted as General. thanks.

"Markus Fischer" wrote:

Where do you records start in colum H:L?

Basically on cell J2 it should be :
=VLOOKUP(L2,C$1:D$321,2,FALSE)
cell J3:
=VLOOKUP(L3,C$1:D$321,2,FALSE)

And so on...


"pm" wrote:

My first record starts at line 2, so I changed the formula to C$2:D$321.
Column D = locations and column L = formula.....results are still #NA

"Markus Fischer" wrote:

Are your records starting at line 1? If not you might want to adjut the
C$1:D$321 part of the formula. Column D should contain the locations and
column L the formula.

Let me know if it works.

"pm" wrote:

Hey Markus,

Thanks for the suggestion. I am now getting #N/A in my location field...any
suggestions?

"Markus Fischer" wrote:

As suggested change to
"=VLOOKUP(L3,C$1:D$321,2,FALSE)"

"Niek Otten" wrote:

LOOKUP requires your table (col L) to be sorted ascending.
Use VLLOKUP instead. Look here for a tutorial:

http://www.contextures.com/xlFunctions02.html

Pay special attention to the 4th argument of VLOOKUP; don't omit it.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"pm" wrote in message ...
| Still struggling with my lookup formula. The table below is an example of
| what I am trying to accomplish. I am getting inconsistent results. I
| concatenated column H, and I into L. My goal is to find the vendor match in
| the table with column L. And if it matches populate column J with the
| corresponding Location from the table in column D. I am using the following
| formula in J: =LOOKUP(L3,C$1:D$321,D$1:D$321). In this example the 1st and
| 2nd row pulled the right location. But in the 3rd row it pulled the wrong
| location - from the row above. I appreciate any help!
|
|
| H I J L
| 999050539 FORT BEND COUNTY JP#2 LOC1 999050539FORT BEND COUNTY JP#2
| 999120266 JIM WELLS COUNTY JP1 LOC2 999120266JIM WELLS COUNTY JP1
| 999075446 JP 1 WILLIAMSON COUNTY LO16 999075446JP 1 WILLIAMSON COUNTY
|
| Vendor Table:
| C
| D
| 999050539FORT BEND COUNTY JP#2 LOC1
| 999120266JIM WELLS COUNTY JP1 LOC1
| 999074481MONTGOMERY JP #5 LO16
| 999075446JP 1 WILLIAMSON COUNTY LOC4
|
|
|
|
|
|
|
|



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 table Brian Excel Discussion (Misc queries) 2 December 2nd 05 06:15 PM
How do I lookup a corresponding value in another table Des Excel Worksheet Functions 2 November 7th 05 11:28 AM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM
lookup or table, not sure what to do [email protected] Excel Worksheet Functions 2 February 17th 05 09:36 PM
Lookup Table Ben Excel Worksheet Functions 7 November 30th 04 07:05 PM


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