ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   pairing 2 column in one sheet (https://www.excelbanter.com/excel-discussion-misc-queries/270222-pairing-2-column-one-sheet.html)

thahir

pairing 2 column in one sheet
 
HI
I am new to this thread i have a quiery in excel 2003
i want to pair to columns in one sheet like column D & E when i slect the value in column D the value of column E should be selected automatiocally and the value cannot be changed
please help

thahir

tarquinious

Quote:

Originally Posted by thahir (Post 964577)
HI
I am new to this thread i have a quiery in excel 2003
i want to pair to columns in one sheet like column D & E when i slect the value in column D the value of column E should be selected automatiocally and the value cannot be changed
please help

thahir

Your question can be interpreted in a few different solutions, but guessing what you are after, I have come up with the following:

I assume you are attempting to have 2 lists where an item from the first list (Column D) is in a dropdown, and when one is selected, you add in the value from the second (Column E)?

One thought is to use a VLOOKUP() to find the value, then CONCATENATE() to add them together.

As an example, you have the following data in columns D and E:

(Sorry about formatting - I'm new here too, ignore the underscores)
D_________E
apple______is a fruit
banana____is a bendy fruit
chicken____is a bird
pilchard____is a fish

In cell D7 (remember this cell as we'll use it in the formula below) create a List of Column D items using Data Validation and selecting cells D1 to D4 (apple down to pilchard).

In another cell (e.g. D9), put in the formula:
=CONCATENATE(D7,VLOOKUP(D7,D1:E4,2,FALSE))

This will look up the value that corresponds to the one the user has selected in D7 from the list in column E and add concatenate the two.

This should result in the following appearing in D9 when different alues are selected in D7:
apple is a fruit
banana is a bendy fruit
chicken is a bird
pilchard is a fish

UniseeGed

Is it possible to have a variable for the sheet name?

Code:


All times are GMT +1. The time now is 12:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com