Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula
Hello,
Can you please help me with this problem, I have 2 Columns, with 5 Rows each or any amount of rows, for example Column A contains the following numbers 1,2,3,8,3 and column B Contains 0,2,9,4,3. What I want to do is Compare both columns and if the rows match (row number 2 and 5 in this example), I want the numbers added. so in this example since row number 2 and 5 match, i want them added which in this case would equal 5. Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula
Try something like this:
=SUMPRODUCT(--(A1:A5=B1:B5),(A1:A5)) Activate with CTRL SHIFT ENTER HTH, Barb Reinhardt "HIRAN" wrote: Hello, Can you please help me with this problem, I have 2 Columns, with 5 Rows each or any amount of rows, for example Column A contains the following numbers 1,2,3,8,3 and column B Contains 0,2,9,4,3. What I want to do is Compare both columns and if the rows match (row number 2 and 5 in this example), I want the numbers added. so in this example since row number 2 and 5 match, i want them added which in this case would equal 5. Thanks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula
Hi Barb
Just a quick "heads up" - The Sumproduct formula does not need to be array entered. Just Enter will do. -- Regards Roger Govier "Barb Reinhardt" wrote in message ... Try something like this: =SUMPRODUCT(--(A1:A5=B1:B5),(A1:A5)) Activate with CTRL SHIFT ENTER HTH, Barb Reinhardt "HIRAN" wrote: Hello, Can you please help me with this problem, I have 2 Columns, with 5 Rows each or any amount of rows, for example Column A contains the following numbers 1,2,3,8,3 and column B Contains 0,2,9,4,3. What I want to do is Compare both columns and if the rows match (row number 2 and 5 in this example), I want the numbers added. so in this example since row number 2 and 5 match, i want them added which in this case would equal 5. Thanks |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula
Thank you for the solution, it worked great. I have one other issue and
wondering if you might be able to help me, what if I want to accomplish a similar task but instead of matching similar numbers in the two columns, I want to see if there is anything in the two columns. For example 2 Columns, with 5 Rows each, Column A contains the following numbers 1, , , ,3 and column B Contains 1,2,3,4,5. What I want to do is Compare both columns and if the rows contain any numbers (row number 1, and 5 in this example), I want the column A numbers to be added so in this example since row number 1 and 5 match, I want them added which in this case would equal 4. Thanks again for your help and I really appreciate it. -Hiran "Barb Reinhardt" wrote: Try something like this: =SUMPRODUCT(--(A1:A5=B1:B5),(A1:A5)) Activate with CTRL SHIFT ENTER HTH, Barb Reinhardt "HIRAN" wrote: Hello, Can you please help me with this problem, I have 2 Columns, with 5 Rows each or any amount of rows, for example Column A contains the following numbers 1,2,3,8,3 and column B Contains 0,2,9,4,3. What I want to do is Compare both columns and if the rows match (row number 2 and 5 in this example), I want the numbers added. so in this example since row number 2 and 5 match, i want them added which in this case would equal 5. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|