ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to fill the matched field automatically (https://www.excelbanter.com/excel-discussion-misc-queries/51358-how-fill-matched-field-automatically.html)

SJ Hong

How to fill the matched field automatically
 
I have following work data.

1. Sheet1

Company code Company name Products Amounts ......
--------------------------------------------------------
aa ZZZ $1,000
ab XXX $900
ca ZZZ $800
dd VVV $1,000
aa XXX $800
..
..
..


2. Sheet2
Company code Company name
--------------------------------
aa ABC Corp.
ab TS Elec.
ca CC Mech.
dd NJ Corp.
..
..
..

As you can see, the company name field is blank. Is there any proper formula
if company code is same between sheet1 and sheet2, company name is filled
automatically in Sheet1?
I would like to know a proper formula in the company name field of Sheet1.


Thanks in advance
SJ Hong



Rowan Drummond

How to fill the matched field automatically
 
Use the VLOOKUP formula eg
=VLOOKUP(A2,Sheet2!$A$2:$D$20,2,0)
See excel help and http://www.contextures.com/xlFunctions02.html for
more information.

Hope this helps
Rowan

SJ Hong wrote:
I have following work data.

1. Sheet1

Company code Company name Products Amounts ......
--------------------------------------------------------
aa ZZZ $1,000
ab XXX $900
ca ZZZ $800
dd VVV $1,000
aa XXX $800
.
.
.


2. Sheet2
Company code Company name
--------------------------------
aa ABC Corp.
ab TS Elec.
ca CC Mech.
dd NJ Corp.
.
.
.

As you can see, the company name field is blank. Is there any proper formula
if company code is same between sheet1 and sheet2, company name is filled
automatically in Sheet1?
I would like to know a proper formula in the company name field of Sheet1.


Thanks in advance
SJ Hong



topola

How to fill the matched field automatically
 

SJ Hong napisal(a):
I have following work data.

1. Sheet1

Company code Company name Products Amounts ......
--------------------------------------------------------
aa ZZZ $1,000
ab XXX $900
ca ZZZ $800
dd VVV $1,000
aa XXX $800
.
.
.


2. Sheet2
Company code Company name
--------------------------------
aa ABC Corp.
ab TS Elec.
ca CC Mech.
dd NJ Corp.
.
.
.

As you can see, the company name field is blank. Is there any proper formula
if company code is same between sheet1 and sheet2, company name is filled
automatically in Sheet1?
I would like to know a proper formula in the company name field of Sheet1.


Thanks in advance
SJ Hong


In Sheet2 select your data range and name this range "DATA".
In Sheet1 cell B3 formula = VLOOKUP($A3,data,2,0). For details while
being in the cell with formula select Insert Function.

Tomek Polak
http://vba.blog.onet.pl



All times are GMT +1. The time now is 03:41 PM.

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