Aligning Two Sets of Data That Share Only Some Values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

This problem is hard to explain without an example. I am using Excel 2003.
I have two sets of data:

Set 1:

Time Value
10:18:06 1
10:18:10 3
10:18:14 5

Set 2:

Time Value
10:18:04 1
10:18:05 2
10:18:06 3
10:18:07 2
10:18:08 3
10:18:09 4
10:18:10 5
10:18:11 1
10:18:12 3
10:18:13 6
10:18:14 3

As you can see, set 1 and 2 share only some "time" values. What I would
like to do is align the "values" at shared "time" from set 1 next to set 2 so
I can create a formula to work with those two shared values. Any ideas how
to automate a task to take the two sets of data above and create the
following result:

Time Set 2 Value Set 1 Value
10:18:04 1
10:18:05 2
10:18:06 3 1
10:18:07 2
10:18:08 3
10:18:09 4
10:18:10 5 3
10:18:11 1
10:18:12 3
10:18:13 6
10:18:14 3 5

Thanks for the help!
 
If the first set of data are in cells A2 - B4

And the second set of data begin at D2 then you enter into cell E2
the following formula

IF(COUNTIF($A$2:$A$4,D2)>0,SUMIF($A$2:$A$4,D2,$B$2:$B$4),"")

and copy this formula down the column in which you want the values.
Obviously you could use range names rather than the specific cell
references.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top