Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA | Excel Worksheet Functions | |||
Date & Time | New Users to Excel | |||
Conversion | Excel Worksheet Functions | |||
How do I copy a function for comparison but keep first cell value. | Excel Worksheet Functions | |||
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. | Excel Worksheet Functions |