A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Lookup Function Not in Ascending Order



 
 
Thread Tools Display Modes
  #1  
Old July 29th, 2008, 11:49 AM posted to microsoft.public.excel.worksheet.functions
Jessica Donadio
external usenet poster
 
Posts: 20
Default Lookup Function Not in Ascending Order

Is there any other way of going about getting the results that the lookup
function obtains without the list havng to be in ascending order? I have a
pretty large database of company's names and when I make a new record and
input the country I want the values for postal code, subsequent postal cost,
best time to call, hour difference, etc, to all be pre-populated based on
previuos records for that country. But my excel sheet will be subject to new
ordering a lot, so Lookup will not work. I've found some formulas for IF but
I have more than 7 conditions. Thank you to anyone who may be able to help
me.
  #2  
Old July 29th, 2008, 11:59 AM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default Lookup Function Not in Ascending Order

Please give further details. It is possible to use VLOOKUP and HLOOKUP
with the data not sorted - set the 4th parameter to FALSE or 0 to look
for an exact match.

Hope this helps.

Pete

On Jul 29, 11:49*am, Jessica Donadio
wrote:
Is there any other way of going about getting the results that the lookup
function obtains without the list havng to be in ascending order? *I have a
pretty large database of company's names and when I make a new record and *
input the country I want the values for postal code, subsequent postal cost,
best time to call, hour difference, etc, to all be pre-populated based on
previuos records for that country. *But my excel sheet will be subject to new
ordering a lot, so Lookup will not work. *I've found some formulas for IF but
I have more than 7 conditions. *Thank you to anyone who may be able to help
me. * * *


  #3  
Old July 29th, 2008, 12:25 PM posted to microsoft.public.excel.worksheet.functions
Jessica Donadio
external usenet poster
 
Posts: 20
Default Lookup Function Not in Ascending Order

thank you so much for your quick response! Your post help me clear up my
uncertainty with the previous posts I read in regards to VLookup, I didn't
understand the 3rd parameter indicated the 1st, 2nd, 3rd, column, and that
the table was an area you could select. Adding the logic test was just what
I needed to do.
  #4  
Old July 29th, 2008, 12:25 PM posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default Lookup Function Not in Ascending Order

On Tue, 29 Jul 2008 03:49:02 -0700, Jessica Donadio
wrote:

Is there any other way of going about getting the results that the lookup
function obtains without the list havng to be in ascending order? I have a
pretty large database of company's names and when I make a new record and
input the country I want the values for postal code, subsequent postal cost,
best time to call, hour difference, etc, to all be pre-populated based on
previuos records for that country. But my excel sheet will be subject to new
ordering a lot, so Lookup will not work. I've found some formulas for IF but
I have more than 7 conditions. Thank you to anyone who may be able to help
me.


It seems as if you could use an exact match.

Depending on how your data is set up, you could probably use VLOOKUP or HLOOKUP
with FALSE entered for the optional Range_lookup argument. This would require
an exact match.

If that does not work, post back with more information, as the use of INDEX and
MATCH (with the Exact parameter within the MATCH function) should be adaptable
to your data.
--ron
  #5  
Old July 29th, 2008, 12:50 PM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default Lookup Function Not in Ascending Order

Glad to be of help - thanks for feeding back.

Pete

On Jul 29, 12:25*pm, Jessica Donadio
wrote:
thank you so much for your quick response! *Your post help me clear up my
uncertainty with the previous posts I read in regards to VLookup, I didn't
understand the 3rd parameter indicated the 1st, 2nd, 3rd, column, and that
the table was an area you could select. *Adding the logic test was just what
I needed to do. *


  #6  
Old July 29th, 2008, 02:29 PM posted to microsoft.public.excel.worksheet.functions
Jessica Donadio
external usenet poster
 
Posts: 20
Default Lookup Function Not in Ascending Order

Well the only snag is that when I paste the values down the column it
progressively causes the top rows not to be included in the range of data.
However, I still want to retain the relative cell value of the first parameter

As an example I have countries listed in column H and then the corresponding
postal zones in column I (whose values are either 1,2,3, or Italy). Vlookup
works, but if I start a new record 500 rows down, the cell reference for the
top of the range will move likewise, so that it may not find the country
value if there is only one located towards the top of the list. Is there a
way to incorporate both absolute and relative cell referencing in the same
function?

Or, with index and match, how would I go about it to simply return the
respective postal zones for each country? Thanks again!

"Ron Rosenfeld" wrote:

On Tue, 29 Jul 2008 03:49:02 -0700, Jessica Donadio
wrote:

Is there any other way of going about getting the results that the lookup
function obtains without the list havng to be in ascending order? I have a
pretty large database of company's names and when I make a new record and
input the country I want the values for postal code, subsequent postal cost,
best time to call, hour difference, etc, to all be pre-populated based on
previuos records for that country. But my excel sheet will be subject to new
ordering a lot, so Lookup will not work. I've found some formulas for IF but
I have more than 7 conditions. Thank you to anyone who may be able to help
me.


It seems as if you could use an exact match.

Depending on how your data is set up, you could probably use VLOOKUP or HLOOKUP
with FALSE entered for the optional Range_lookup argument. This would require
an exact match.

If that does not work, post back with more information, as the use of INDEX and
MATCH (with the Exact parameter within the MATCH function) should be adaptable
to your data.
--ron

  #7  
Old July 29th, 2008, 02:36 PM posted to microsoft.public.excel.worksheet.functions
Jessica Donadio
external usenet poster
 
Posts: 20
Default Lookup Function Not in Ascending Order

Wow, forget that, right after I typed that I saw below my thread what the $
sign means before the cell. All is good.

I would still be curious about how this could be achieved through
index/match and what would be the advantages to doing so, but otherwise,
thank you all!

"Jessica Donadio" wrote:

Well the only snag is that when I paste the values down the column it
progressively causes the top rows not to be included in the range of data.
However, I still want to retain the relative cell value of the first parameter

As an example I have countries listed in column H and then the corresponding
postal zones in column I (whose values are either 1,2,3, or Italy). Vlookup
works, but if I start a new record 500 rows down, the cell reference for the
top of the range will move likewise, so that it may not find the country
value if there is only one located towards the top of the list. Is there a
way to incorporate both absolute and relative cell referencing in the same
function?

Or, with index and match, how would I go about it to simply return the
respective postal zones for each country? Thanks again!


  #8  
Old July 29th, 2008, 03:17 PM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default Lookup Function Not in Ascending Order

Glad you got it sorted in the end. You can used named ranges to avoid
the problems of absolute addresses.

The INDEX/MATCH approach would be something like this:

=INDEX(return_column,MATCH(lookup,sought_column,0) )

to replace:

=VLOOKUP(lookup,table,column,0)

If you are using VLOOKUP the sought item has to be in the left-most
column of the table, but with INDEX/MATCH the sought_column can be to
the right of the return_column.

Hope this helps.

Pete

On Jul 29, 2:36*pm, Jessica Donadio
wrote:
Wow, forget that, right after I typed that I saw below my thread what the $
sign means before the cell. *All is good.

I would still be curious about how this could be achieved through
index/match and what would be the advantages to doing so, but otherwise,
thank you all!



"Jessica Donadio" wrote:
Well the only snag is that when I paste the values down the column it
progressively causes the top rows not to be included in the range of data. *
However, I still want to retain the relative cell value of the first parameter


As an example I have countries listed in column H and then the corresponding
postal zones in column I (whose values are either 1,2,3, or Italy). *Vlookup
works, but if I start a new record 500 rows down, the cell reference for the
top of the range will move likewise, so that it may not find the country
value if there is only one located towards the top of the list. *Is there a
way to incorporate both absolute and relative cell referencing in the same
function?


Or, with index and match, how would I go about it to simply return the
respective postal zones for each country? *Thanks again!- Hide quoted text -


- Show quoted text -


  #9  
Old July 29th, 2008, 04:37 PM posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default Lookup Function Not in Ascending Order

On Tue, 29 Jul 2008 06:36:00 -0700, Jessica Donadio
wrote:

Wow, forget that, right after I typed that I saw below my thread what the $
sign means before the cell. All is good.

I would still be curious about how this could be achieved through
index/match and what would be the advantages to doing so, but otherwise,
thank you all!


The advantage to index/match is that the lookup value does not need to be to
the left of, or above the returned value. Whereas with index/match, the lookup
value location is irrelevant.
--ron
  #10  
Old August 1st, 2008, 06:53 PM posted to microsoft.public.excel.worksheet.functions
Jessica Donadio
external usenet poster
 
Posts: 20
Default Lookup Function Not in Ascending Order

So if I have cities filling column E (to E1236) and their respective
countries in column H (to H1236) How do I write the function so that in a
new record the country value automatically matches the city I input? I've
tried this, but no dice:

=INDEX(H:H,MATCH(H10,E:E,0))

"Pete_UK" wrote:

Glad you got it sorted in the end. You can used named ranges to avoid
the problems of absolute addresses.

The INDEX/MATCH approach would be something like this:

=INDEX(return_column,MATCH(lookup,sought_column,0) )

to replace:

=VLOOKUP(lookup,table,column,0)

If you are using VLOOKUP the sought item has to be in the left-most
column of the table, but with INDEX/MATCH the sought_column can be to
the right of the return_column.

Hope this helps.

Pete

On Jul 29, 2:36 pm, Jessica Donadio
wrote:
Wow, forget that, right after I typed that I saw below my thread what the $
sign means before the cell. All is good.

I would still be curious about how this could be achieved through
index/match and what would be the advantages to doing so, but otherwise,
thank you all!



"Jessica Donadio" wrote:
Well the only snag is that when I paste the values down the column it
progressively causes the top rows not to be included in the range of data.
However, I still want to retain the relative cell value of the first parameter


As an example I have countries listed in column H and then the corresponding
postal zones in column I (whose values are either 1,2,3, or Italy). Vlookup
works, but if I start a new record 500 rows down, the cell reference for the
top of the range will move likewise, so that it may not find the country
value if there is only one located towards the top of the list. Is there a
way to incorporate both absolute and relative cell referencing in the same
function?


Or, with index and match, how would I go about it to simply return the
respective postal zones for each country? Thanks again!- Hide quoted text -


- Show quoted text -



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:51 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.