Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JR JR is offline
external usenet poster
 
Posts: 92
Default How do I update worksheet 1 from data on worksheet 2

I have two worksheets in same Excel file. Worksheet 1 has a record ID number
in column A and data in other columns. I have a column (lets say K) in
worksheet 1 that I want to update (replace) from worksheet 2.

Worksheet 2 doesn't have as many records as worksheet 1. Worksheet 2 also
has an record ID in column A. All IDs in WorkSheet 2 match an ID in
worksheet 1. I want to take an ID from worksheet 2, find its corresponding
ID in worksheet 1 and for that row in worksheet 1 update column K from column
B in worksheet 2 where the Worksheet 2 ID = Worksheet 1 ID.

I prefer to use an Excel functions to do it, but if I have to I would use
SQL if it is possible. Any help will be appreciated.

JR
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How do I update worksheet 1 from data on worksheet 2

One way..

In Sheet1,

Put in K2:
=IF(ISNA(MATCH(A2,Sheet2!A:A,0)),"",INDEX(Sheet2!B :B,MATCH(A2,Sheet2!A:A,0)))
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"JR" wrote:
I have two worksheets in same Excel file. Worksheet 1 has a record ID number
in column A and data in other columns. I have a column (lets say K) in
worksheet 1 that I want to update (replace) from worksheet 2.

Worksheet 2 doesn't have as many records as worksheet 1. Worksheet 2 also
has an record ID in column A. All IDs in WorkSheet 2 match an ID in
worksheet 1. I want to take an ID from worksheet 2, find its corresponding
ID in worksheet 1 and for that row in worksheet 1 update column K from column
B in worksheet 2 where the Worksheet 2 ID = Worksheet 1 ID.

I prefer to use an Excel functions to do it, but if I have to I would use
SQL if it is possible. Any help will be appreciated.

JR

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How do I update worksheet 1 from data on worksheet 2

As you have a common "primary key" in both worksheets, you should use a
VLOOKUP formula.

Lookup_value: cell a1
Table Array: select column a to K in sheet 2
col_index_num: This is the column number of the result & works from left to
right. In this case K is the 11th column counting from A to K always
starting at 1 not zero.
Range_lookup: 0 or False (always)

Hope this helps
Denis J
"JR" wrote:

I have two worksheets in same Excel file. Worksheet 1 has a record ID number
in column A and data in other columns. I have a column (lets say K) in
worksheet 1 that I want to update (replace) from worksheet 2.

Worksheet 2 doesn't have as many records as worksheet 1. Worksheet 2 also
has an record ID in column A. All IDs in WorkSheet 2 match an ID in
worksheet 1. I want to take an ID from worksheet 2, find its corresponding
ID in worksheet 1 and for that row in worksheet 1 update column K from column
B in worksheet 2 where the Worksheet 2 ID = Worksheet 1 ID.

I prefer to use an Excel functions to do it, but if I have to I would use
SQL if it is possible. Any help will be appreciated.

JR

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy data into another worksheet and have it update automatically? Taxed Mind Excel Discussion (Misc queries) 4 October 6th 06 12:17 AM
Copy data into another worksheet and have it update automatically? Lmarie6 Excel Discussion (Misc queries) 10 March 31st 06 04:57 PM
VBA: Update worksheet when txtBox data changes. Mcasteel Excel Worksheet Functions 2 November 14th 04 11:59 PM
VBA: Update worksheet when txtBox data changes. Mcasteel Excel Worksheet Functions 1 November 13th 04 03:19 PM
VBA: Update worksheet when txtBox data changes. Mcasteel Excel Worksheet Functions 1 November 1st 04 06:18 PM


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"