• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Not equal to in a function

Bryz

New Member
Hi all,

Just would like to know if there is a way to use an if function that refers to a not equal to (e.g. =if(a2"does not equal to"b3,....))

Thanks!

Bryz
 
Hi Bryz ,

Certainly ; your IF statement would be :

=IF(A2 <> B3 , .... , .... )

The combination of <> is used for the inequality ( not equal to ) comparison.

Narayan
 
Hi Narayan,

It doesn't seem to work. I've uploaded part of the worksheet I'm working on. I'm trying to get column H reflect the current employer if they have changed (i.e. they have terminated from company a and moved to company b).

Thanks
Bryz
 

Attachments

Hi Bryz ,

The correct logic would be as follows :

1. Let us assume that the combination of the Given Names and the Surname will be unique ; this combination can be derived by using C2 & " " & B2.

2. Compare the combination in any row with the combination in the next row ; if this is not the same , then the employee has not been terminated , and is continuing in the same company.

3. If the combination is the same in two successive rows , and the employer is different , then there is a change of company.

If we put all of the above together , our formula would be :

=IF(C2 & " " & B2<> C3 & " " & B3,IF(C2 & " " & B2<> C1 & " " & B1,D2,""),IF(D2 <> D3, D3, ""))

Another possibility would be :

=IF(C2 & " " & B2<> C3 & " " & B3,D2,"")

Narayan
 
Back
Top