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. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|