ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Substitute the value from another Workbook (https://www.excelbanter.com/excel-programming/415581-substitute-value-another-workbook.html)

Mr_Huang

Substitute the value from another Workbook
 
I have two workbooks, first contained the Login_name and Full_name,
second workbook contained Login_name and other fields, Login_name will
be the index field, I want to create a report/worksheet to show the
Full_name with the other fields together in replacing the Login_name.
How is it possible?
thanks
huang

Bob Bridges

Substitute the value from another Workbook
 
Unless you need it to be done with a program for some reason, I'd just use
the VLOOKUP worksheet function. In your first workbook you have a list of
login names and the person's name for each; in the second workbook you have a
list of possible login names with additional columns showing more information
(last logon date, default group, last date the user changed the password,
maybe the CICS OPID, whatever).

Let's assume that the second workbook is at T:\Dpt archives\InfoSec\MVS.xls,
the sheet you want is named UserIDs, and on that sheet the login ID is in
column A and the other data is to the right. In the first workbook the login
ID is also in column A and the name is in B. You want to capture, oh, say
the default TSO prefix for each ID, so starting with row 3, in column C of
the first workbook you type this formula:

=VLOOKUP(A3, 'T:\Dpt archives\InfoSec\[MVS.xls]!UserIDs'!A:K,5,0)

This means you want to take the value in A3 and look for it in column A of
the second workbook. When it finds the userID value in that column, you want
to work out to the 5th column and put it here (that is, in A3 of the first
workbook). The '0' means you insist on the UserID being an exact match; if
it isn't, an error will show in this cell instead of a match on the UserID
that's closest to the one you asked for.

You can look up VLOOKUP for more details, but that should get you started.

--- "Mr_Huang" wrote:
I have two workbooks, first contained the Login_name and Full_name,
second workbook contained Login_name and other fields, Login_name will
be the index field, I want to create a report/worksheet to show the
Full_name with the other fields together in replacing the Login_name.
How is it possible?



All times are GMT +1. The time now is 02:28 AM.

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