ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Comparing Absolute Column on multiple rows (https://www.excelbanter.com/excel-programming/344492-comparing-absolute-column-multiple-rows.html)

mortals

Comparing Absolute Column on multiple rows
 
Hi guys,

I'm trying to run a check between two worksheets. One worksheet
contains a column of serial numbers. On the second worksheet, i have a
column of companies (100 different companies) and multiple rows (For
the sake of this example, 30 rows) of serial numbers assigned to them.

I've tried nesting a IF loop within a sum

=(SUM(IF(Sheet2!$A$1:$A$20=Sheet1!B2:B30,1,0)))

But apparently, that doesn't work. Just any way to flag the rows that
contain the serial numbers that I am looking up would help. Thanks.


-Simon


Tom Ogilvy

Comparing Absolute Column on multiple rows
 
=SUM(IF(Sheet2!$A$1:$A$20=TRANSPOSE(Sheet1!$B$1:$B $30),1,0))

enter/commit with Ctrl+Shift+Enter rather than just enter since this is an
array formula

--
Regards,
Tom Ogilvy


"mortals" wrote in message
oups.com...
Hi guys,

I'm trying to run a check between two worksheets. One worksheet
contains a column of serial numbers. On the second worksheet, i have a
column of companies (100 different companies) and multiple rows (For
the sake of this example, 30 rows) of serial numbers assigned to them.

I've tried nesting a IF loop within a sum

=(SUM(IF(Sheet2!$A$1:$A$20=Sheet1!B2:B30,1,0)))

But apparently, that doesn't work. Just any way to flag the rows that
contain the serial numbers that I am looking up would help. Thanks.


-Simon




mortals

Comparing Absolute Column on multiple rows
 
My mistake, I meant that the rows would be Sheet1!B1:AE1

That would make a big difference.


Tom Ogilvy

Comparing Absolute Column on multiple rows
 
=SUM(IF(Sheet2!$A$1:$A$20=Sheet1!$B$1:$AE$1,1,0))

Should work when entered/committed with Ctrl+Shift+Enter rather than just
enter.

--
Regards,
Tom Ogilvy


"mortals" wrote in message
ups.com...
My mistake, I meant that the rows would be Sheet1!B1:AE1

That would make a big difference.




mortals

Comparing Absolute Column on multiple rows
 
It works!!! Its alive!!!

Now i feel a little stupid. But thanks Tom



All times are GMT +1. The time now is 05:24 PM.

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