ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do i grab a table value to fill a cell? (https://www.excelbanter.com/excel-programming/357998-how-do-i-grab-table-value-fill-cell.html)

gail1166

How do i grab a table value to fill a cell?
 
I need to change two columns on a spread sheet to match the table for vendor
codes and ledger codes. In other words, on the spreadsheet it shows the code
and I want the actual name to appear from a sheet that lists all the codes
with the corresponding name.

Toppers

How do i grab a table value to fill a cell?
 
Look at VLOOKUP function.

Assuming your lookup table has the code in Col A and Names in Col B on
Sheet2 rows 2 to 100 then

=Vlookup(<vendorcode,Sheet2!a2:b100,2,false)

where <vendorcode is the code in your first sheet; this can be a cell e.g
A1 with formula in B1:

=Vlookup(A1,Sheet2!a2:b100,2,false)

This formula will need to be a new column in your first sheet. Copy down as
required.

If you want to replace the code with the name i.e in same cell, will need to
use VBA.

HTH

"gail1166" wrote:

I need to change two columns on a spread sheet to match the table for vendor
codes and ledger codes. In other words, on the spreadsheet it shows the code
and I want the actual name to appear from a sheet that lists all the codes
with the corresponding name.



All times are GMT +1. The time now is 02:56 PM.

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