Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
pirat2104
 
Posts: n/a
Default How can I relate more than 7 cells with IF(...

I have to relate a list of Names to a special code, no problem with up to 7
by using the nest function.
example :
A B C D
10 USA ABC Co. 93246
20 Canada DEF Firm 38490
30 Brasil XXY Ltd. 12345
40 Germany ... ... ...
50 Egypt ...
....
For the moment I work with =IF(B2="USA";10;IF(B3="Canada";20;IF(B4="Brasil ...
my list of names is longer than 7, which does not work, or ?
Intention is to fill automatically a column ( in this case A ) referred to a
column you just typed in (e.g. B ).
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vito
 
Posts: n/a
Default How can I relate more than 7 cells with IF(...


Why don't you use a Vlookup to do this.

Somewhere on the side create a table that lists the countries in the
first column and the associated numbers in the second.

Then in Column A, enter formula =Vlookup(B2,$AA$1:$AB$100,2,0), where
AA1:AB100 contains your lookup table, then you can copy the formula
down column A.


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=489402

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default How can I relate more than 7 cells with IF(...

Vlookup would be your answer if the column from which you wanted to return
data (A in your example) were right of the column on which that value is
based (B). Since that's not the case here, you'd have to combine MATCH to
determine the correct row with INDEX to get that row's data from column A:
=index(a:a,match("USA",b:b,false))

"pirat2104" wrote:

I have to relate a list of Names to a special code, no problem with up to 7
by using the nest function.
example :
A B C D
10 USA ABC Co. 93246
20 Canada DEF Firm 38490
30 Brasil XXY Ltd. 12345
40 Germany ... ... ...
50 Egypt ...
...
For the moment I work with =IF(B2="USA";10;IF(B3="Canada";20;IF(B4="Brasil ...
my list of names is longer than 7, which does not work, or ?
Intention is to fill automatically a column ( in this case A ) referred to a
column you just typed in (e.g. B ).

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vito
 
Posts: n/a
Default How can I relate more than 7 cells with IF(...


It's seems to me that the intent of the OP is to fill column A with
values corresponding to those country names. The index function
proposed indexes column A and will therefore get a circular reference
error.

I could be wrong...in my interpretation though.


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=489402

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
how do you "select locked cells" w/o "select unlocked cells"? princejohnpaulfin Excel Discussion (Misc queries) 3 July 16th 05 03:53 AM
Deselect Cells while using ctrl Sloth Excel Discussion (Misc queries) 5 July 14th 05 10:58 PM
Counting only active cells Sac73 Excel Discussion (Misc queries) 16 April 4th 05 05:49 AM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 15th 05 11:14 PM
Convert data type of cells to Text,Number,Date and Time Kevin Excel Worksheet Functions 1 December 31st 04 12:57 PM


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