English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Can anybody help me? I'm wondering if this would be possible and if so, how do I do it?

I want to create a excel sheet where if I were to type in a certain value, (let say in cell a1) a certain phrase will show up in (let say in cell b1). Would this be possible?

For example, in cell [a1] I will type in the value of: 1996. By doing so, I want cell [b1] to give a phrase of: This is the year of so and so.

So [a1] is the input and [b1] is the output phrase

Where input value 1996= this is the year so and so
Where input value 1997= this is not the year so and so

Any ideas? I have a lot of books and I don't mind doing all the research, I enjoy it, but I need someone to give guidance along with some creative insight on how I should go about in doing this. Thanks you

Can this idea be executable by excel alone or do I need to use access or VBA or macro?

2006-11-22 10:18:53 · 2 answers · asked by Inquisit 2 in Computers & Internet Programming & Design

2 answers

Use Index Match - it will find exactly what you type in column A

Where X! is the name of your data spreadsheet, where $A$1:F$6418 is an example of the rows in the data spreadsheet, where $B2 is the beginning cell of your data spreadsheet. The final number shown with a comma is the column position in your data spreadsheet:

=IF(ISNA(INDEX(x!$A$1:F$6418,MATCH($B2,x!$A$1:$A$6418,0),2)),"",INDEX(x!$A$1:$G$6418,MATCH($B2,x!$A$1:$A$6418,0),2))

The fomula above may be truncated. Highlite i with your mouse to copy.

Click on my pic and send me an email if you want a sample spreadsheet.

Best wishes,

pup

2006-11-22 13:56:22 · answer #1 · answered by . 6 · 0 0

In sheet1 cell A1 type your year
In sheet1 cell B1 type the following formula
=LOOKUP(A1,Sheet2!A1:B2)

In Sheet2 cell A1 type a year
In Sheet2 cell B1 type a description
In Sheet2 cell A2 type another year
In Sheet2 cell B2 type another description

Note:
In the formula the range is Sheet2!A1:B2
This must be extended for all of the entries that you put in the list.
So if you have five entries the range will be Sheet2!A1:B5

If the year is not found then the results may be unpredictable or not as required.

2006-11-22 11:46:06 · answer #2 · answered by AnalProgrammer 7 · 0 0

fedest.com, questions and answers