Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 516
Default Compare and then copy cell to separate worksheet

This is what I'm trying to do,
1. I have two workbooks, each with data numbered 1-?.
2. I need to have a function that does this:
(workbook 1, cell a2)=10,
if (workbook 2, cell a2)=10 also, then it inserts (w2, cell b2) into (w1,
cell b2).

And on and on down the line... Without having to enter the formula for each
individual row as I have about 2000 rows at this point...

Is there such a formula? Can it be done? It's made my head hurt so far
trying to figure it out. Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Compare and then copy cell to separate worksheet

I'll assume that both workbooks are open, and guess the filenames. Put
this formula in B2 of workbook1:

=IF(AND(A2=10,A2='[wb2.xls]Sheet1'!A2),'[wb2.xls]Sheet1'!B2,"")

I think this is what you meant, but if the 10 was only an example and
you meant that you want to see if A2 in both workbooks are equal, then
you can simplify it to this:

=IF(A2='[wb2.xls]Sheet1'!A2,'[wb2.xls]Sheet1'!B2,"")

Then select cell B2 again, and double-click the fill handle (the small
black square in the bottom right corner of the cursor) and this will
copy the formula down for you.

Hope this helps.

Pete

On Feb 6, 8:26*pm, Matt wrote:
This is what I'm trying to do,
1. I have two workbooks, each with data numbered 1-?.
2. I need to have a function that does this:
(workbook 1, cell a2)=10,
if (workbook 2, cell a2)=10 also, then it inserts (w2, cell b2) into (w1,
cell b2).

And on and on down the line... Without having to enter the formula for each
individual row as I have about 2000 rows at this point...

Is there such a formula? Can it be done? It's made my head hurt so far
trying to figure it out. Thanks!


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
Compare two Worksheet and copy the diferent rows to other CC Excel Discussion (Misc queries) 0 December 10th 08 04:48 PM
Sort by even and odd digits and copy to separate worksheet K Drier[_2_] Excel Worksheet Functions 3 September 3rd 08 07:56 PM
Compare a value and if is true copy the line to other worksheet Florian Excel Worksheet Functions 2 July 31st 07 09:36 PM
How do I copy each row from 1 Worksheet to separate Worksheets? Dandelo Excel Discussion (Misc queries) 3 July 8th 06 03:00 PM
Copy data automatically onto a separate worksheet Ree Excel Discussion (Misc queries) 1 May 11th 06 07:18 PM


All times are GMT +1. The time now is 12:57 AM.

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

About Us

"It's about Microsoft Excel"