LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
os97
 
Posts: n/a
Default linking values of column A to values of column B

thanks for the reference. i could not find 100% what I wanted, but another
article on contextures.com lead me to the solution of my problem, which I
herewith post for others to consider:

1. validate* column A based on the list of cities in sheet 1
2. type the following function into column B (the list of countries in which
the cities
of column A are):

=IF(A1="","",LOOKUP(A1,Sheet1!$A:$A,Sheet1!$B:$B))

3. copy cell B1
4. highlight column B and press enter

each row in column B has now the lookup function as default value,
regardless of how many rows of data the list eventually may have.

* in order for the lookup function to work properly the list of cities must
be in ascending order !!!
** in order to avoid, difficult cell references in the lookup function, give
the fields in your list names (i.e. highlight the list of cities in column A
of sheet1 and type 'city' in the name box above column A and press enter: A1
should change to city; do the same with column B and name it country); the
lookup function can then be simplified as follows:

=IF(A1="","",LOOKUP(A1,city,country))

Good Luck !

"wdjsxj" wrote:

http://www.contextures.com/excelfiles.html#Function

€œos97€ç¼–写:

lets say i have 2 columns in sheet1: column A lists names of cities, column B
the countries they are in. in sheet2, i would like to do a data validation in
column A based on list of cities in sheet1. in addition, i would like column
B in sheet2 to automatically pick the country from the list in sheet1 in
which the selected city in column A is.

the number of rows in sheet2 could be endless and therefore copying a lookup
function from row to row is not desired.

In an older version of excel, I seem to remember a procedure using "cell
span" ?

 
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
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM
How to chart a single column of values similar to a GROUP BY Paddy Charts and Charting in Excel 3 December 2nd 05 04:29 AM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM
How sum values in column B using values in column A as the conditi oldgrayelf Excel Worksheet Functions 5 February 4th 05 09:03 PM


All times are GMT +1. The time now is 03:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"