View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.charting
Jon Peltier
 
Posts: n/a
Default how can I connect data in cell C to data in cell D?

If all of the numbers in C are also found in D, and D has no duplicates, you
could use some lookups.

Move D and E to F and G. Sort the columns F and G in ascending order by
column F. I assume that the lookup data are now in F2:G101 (assuming row 1
contains labels). Enter this formula in cell D2:

=VLOOKUP(C2,$F$2:$G$101,2,FALSE)

What this does is looks for the number in C2 in the first column of
$F$2:$G$101, and returns the value in column 2 of $F$2:$G$101. FALSE means
return exact matches, and if an exact match isn't found, return #N/A. If you
had used TRUE, you would get a close match: say you were looking up 5 from
C2, and column F contained 2,3,4, no 5, and other higher numbers. The
formula would return the value next to the cell containing 4, the closest
number to 5 that didn't exceed 5.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services - Tutorials and Custom Solutions -
http://PeltierTech.com/
2006 Excel User Conference, 19-21 April, Atlantic City, NJ
http://peltiertech.com/Excel/ExcelUserConf06.html
_______

"Angel82" wrote in message
...
I have allot of data, for example cell A is gender, cell B is year of birth
and cell C is respondentnumber, cell D is also respondent number and cell
E
is kids yes/no. Cell C and D are both respondentnumbers, but they are both
from different datasources, I need to connect the right data from both
sources to eachother. In the end I have to know for each respondent what
its
corresponding gender, year of birth and if they have kids.