Excel-macro to auto populate value in cell [Closed]

Report
Posts
1
Registration date
Monday December 21, 2009
Status
Member
Last seen
December 22, 2009
-
 Alex -
Hi,

I am new to Macros.I would really appreciate if someone can help me with the following problem.


I have created a validation in Column c and given the following values in the list
101857
83274
114711
80169


here every value has its own description

101857 - sales
81274 - Db2
104711 - Oracle
80169 - web


So if I choose 101857 in a cell in Column "c" then the corresponding column in D should be automatically filled in with value Sales.eg: If i choose 101857 in cell C3 then D3 should be auto populated with sales



I want this to be applied in all the cells in C and D columns.Please help!!!

1 reply

I believe you could do this with a simple VLOOKUP function.

Create a table with your list of description in two columns

A B
Column#1 Column#2
A1 101857 sales
A2 81274 Db2
A3 104711 Oracle
A4 80169 web

Now if you type in "101857" in cell (say D1) the you vlookup function in the corresponding cell (say E1) should read
=vlookup(D1,A1:B4,2,False)

Hope this helps!!!

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!