ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Aligning Two Sets of Data That Share Only Some Values (https://www.excelbanter.com/excel-programming/396918-aligning-two-sets-data-share-only-some-values.html)

korkey_2003

Aligning Two Sets of Data That Share Only Some Values
 
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!

[email protected]

Aligning Two Sets of Data That Share Only Some Values
 
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.






On Sep 5, 1:38 pm, korkey_2003
wrote:
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!




korkey_2003[_2_]

Aligning Two Sets of Data That Share Only Some Values
 
great suggestion! Thanks for the help!


"korkey_2003" wrote:

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!



All times are GMT +1. The time now is 02:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com