Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DifficultyInExcel-ing
 
Posts: n/a
Default Comparison Function

I want to compare data on one sheet with data on another sheet (within the
same file) and then populate cells with data from that other sheet. For
example:

Column B (Sheet 1) has data that may have duplicate data from Column A
(Sheet 2). If so, I want to copy the data from Column B (Sheet 2) to Column
E (Sheet 1).

Can someone help me figure out which function(s) to use and how to formulate
the logical sequence?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default Comparison Function

The basic test to pull data from one table based on a matching value earlier
in the same row is a vlookup. To produce a null result when there's no
match, you'd embed that inside an if function. And the formula will always
go in the cell where the result should appear.
So enter a formula in sheet 1, cell E2:
=if(isna(vlookup(b2,Sheet2!A:B,2,0)),"",vlookup(b2 ,Sheet2!A:B,2,0))
You could copy that formula down to as many rows of column E as you need.
(You might first enter just the vlookup part: =vlookup(b2,Sheet2!A:B,2,0)
then Insert Function and see what the dialog tells you about the arguments
of the vlookup function).

"DifficultyInExcel-ing" wrote:

I want to compare data on one sheet with data on another sheet (within the
same file) and then populate cells with data from that other sheet. For
example:

Column B (Sheet 1) has data that may have duplicate data from Column A
(Sheet 2). If so, I want to copy the data from Column B (Sheet 2) to Column
E (Sheet 1).

Can someone help me figure out which function(s) to use and how to formulate
the logical sequence?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DifficultyInExcel-ing
 
Posts: n/a
Default Comparison Function

Thanks so much for your help on this. It's really a time saver! --

"bpeltzer" wrote:

The basic test to pull data from one table based on a matching value earlier
in the same row is a vlookup. To produce a null result when there's no
match, you'd embed that inside an if function. And the formula will always
go in the cell where the result should appear.
So enter a formula in sheet 1, cell E2:
=if(isna(vlookup(b2,Sheet2!A:B,2,0)),"",vlookup(b2 ,Sheet2!A:B,2,0))
You could copy that formula down to as many rows of column E as you need.
(You might first enter just the vlookup part: =vlookup(b2,Sheet2!A:B,2,0)
then Insert Function and see what the dialog tells you about the arguments
of the vlookup function).

"DifficultyInExcel-ing" wrote:

I want to compare data on one sheet with data on another sheet (within the
same file) and then populate cells with data from that other sheet. For
example:

Column B (Sheet 1) has data that may have duplicate data from Column A
(Sheet 2). If so, I want to copy the data from Column B (Sheet 2) to Column
E (Sheet 1).

Can someone help me figure out which function(s) to use and how to formulate
the logical sequence?

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
VBA Monty Excel Worksheet Functions 2 January 30th 06 01:37 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
How do I copy a function for comparison but keep first cell value. N'wester Excel Worksheet Functions 0 February 22nd 05 03:53 AM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 10:58 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"