close

Hi, I am looking for a formula to link a cell containing text to another
cell containing text / data.

Example: I have a list of 'countries' in Cell A1 (using data validation
- lists). In cell B1 I want to have the 'number of states per country'
automatically populate (corresponding to the country selected in cell
A1). Naturally, I will have to have a separate table somewhere on the
page that links the 2 fields.

My question is 'how do i go about linking the 2 fields?

Any help is much appreciated.
Gin--
gin2000
------------------------------------------------------------------------
gin2000's Profile: www.excelforum.com/member.php...oamp;userid=34606
View this thread: www.excelforum.com/showthread...hreadid=543774You could re-use your validation list
Say your countries are in D199
In E1:E99, enter the number of states of the country to the left

In B1, enter formula:
=VLOOKUP(A1,D1:E99,0)

HTH
--
AP

quot;gin2000quot; gt; a écrit
dans le message de news:
...
gt;
gt; Hi, I am looking for a formula to link a cell containing text to another
gt; cell containing text / data.
gt;
gt; Example: I have a list of 'countries' in Cell A1 (using data validation
gt; - lists). In cell B1 I want to have the 'number of states per country'
gt; automatically populate (corresponding to the country selected in cell
gt; A1). Naturally, I will have to have a separate table somewhere on the
gt; page that links the 2 fields.
gt;
gt; My question is 'how do i go about linking the 2 fields?
gt;
gt; Any help is much appreciated.
gt; Gin
gt;
gt;
gt; --
gt; gin2000
gt; ------------------------------------------------------------------------
gt; gin2000's Profile:
gt; www.excelforum.com/member.php...oamp;userid=34606
gt; View this thread: www.excelforum.com/showthread...hreadid=543774
gt;

Hi AP,

Thanks for your response. I tried what you suggested but was not
successful. I was wondering if you could set up your formula in the
attached sheet.
Thanks again
Gin -------------------------------------------------------------------
|Filename: Countries.doc |
|Download: www.excelforum.com/attachment.php?postid=4791 |
-------------------------------------------------------------------

--
gin2000
------------------------------------------------------------------------
gin2000's Profile: www.excelforum.com/member.php...oamp;userid=34606
View this thread: www.excelforum.com/showthread...hreadid=543774Why did you embed your workbook in a Word document?

Here is the corrected workbook: cjoint.com/?ftusOqmrk2

HTH
--
AP

quot;gin2000quot; gt; a écrit
dans le message de news:
...
gt;
gt; Hi AP,
gt;
gt; Thanks for your response. I tried what you suggested but was not
gt; successful. I was wondering if you could set up your formula in the
gt; attached sheet.
gt; Thanks again
gt; Gin
gt;
gt;
gt; -------------------------------------------------------------------
gt; |Filename: Countries.doc |
gt; |Download: www.excelforum.com/attachment.php?postid=4791 |
gt; -------------------------------------------------------------------
gt;
gt; --
gt; gin2000
gt; ------------------------------------------------------------------------
gt; gin2000's Profile:
gt; www.excelforum.com/member.php...oamp;userid=34606
gt; View this thread: www.excelforum.com/showthread...hreadid=543774
gt;

Thanks AP it worked!

I couldn't attach an excel file so that's why I embedded it--
gin2000
------------------------------------------------------------------------
gin2000's Profile: www.excelforum.com/member.php...oamp;userid=34606
View this thread: www.excelforum.com/showthread...hreadid=543774You'd rather zip it.

Cheers,
--
AP

quot;gin2000quot; gt; a écrit
dans le message de news:
...
gt;
gt; Thanks AP it worked!
gt;
gt; I couldn't attach an excel file so that's why I embedded it
gt;
gt;
gt; --
gt; gin2000
gt; ------------------------------------------------------------------------
gt; gin2000's Profile:
gt; www.excelforum.com/member.php...oamp;userid=34606
gt; View this thread: www.excelforum.com/showthread...hreadid=543774
gt;

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()