Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim cell as Range, cell1 as Range
dim sStr as String for each cell in Range(A1:A3) for each cell1 in Range("B1:B4) if cell = cell1 then sStr = sStr & cell & ", " end if next Next sStr = Left(sStr,len(sStr)-2) msgbox sStr You would have to add code if there will be duplicate numbers within a single range. -- Regards, Tom Ogilvy "Tim" <tim@smi wrote in message ... I need a way to get the set intersection of two ranges of cells on an Excel spreadsheet. For example, if one range of cells has the values 1, 2, 3 and another range has the values 1,3,5,6 then the intersetion function on these two ranges would return 1,3. Any suggestions? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
intersection of two tabs in excel | Excel Worksheet Functions | |||
Intersection | Excel Discussion (Misc queries) | |||
Intersection help | Excel Discussion (Misc queries) | |||
Intersection | Excel Discussion (Misc queries) | |||
how do i get the intersection of two arrays in excel? | New Users to Excel |