문제

So I have 2 columns:

Column A: 711 rows

10.35.6.0/24
10.132.42.0/24
10.35.7.0/24
10.142.224.0/24
10.142.208.0/24
10.35.8.0/24
10.134.224.0/24
10.134.20.0/24
10.134.240.0/24

Column C: 2337 rows

10.35.6.0/24
10.132.42.0/24
10.143.26.0/24
10.143.30.0/24
10.143.31.0/24
10.143.32.0/24
10.35.7.0/24
10.143.35.0/24
10.143.44.0/24

What I need is a column B that has the values of column C that do NOT occur in column A. In this example, column B should contain the values:

10.143.26.0/24
10.143.30.0/24
10.143.31.0/24
10.143.32.0/24
10.143.35.0/24
10.143.44.0/24

So it should have (2337 -711 = 1626) rows. Is there a way to do this in MS Excel?

도움이 되었습니까?

해결책

Please try:

=IFERROR(IF(MATCH(C1,A:A,0)>0,"",),C1) 

copied down to suit.

The copied down to suit part may technically not be a loop but is very similar in nature (in so far as a ‘process’ is repeatedly applied to different data up to a given end condition – ie when ‘suit’ ends).

=IF is a condition substantially the same as the If,…Then construct.

=MATCH has an untold amount of code underlying it – even if proprietary (thankfully provided by M$ rather than laboriously put together by a user). VBA does not become "not programming" just because it uses functions.

Cells are referenced RC, as is an option in VBA.

The syntax can be critical, as in other programming.

The formula takes inputs and (hopefully!) produces outputs – just as in other programming.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top