Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

excel difference between two same names count in different positions by name

have four columns:

Name A1 Count B1 Name C1 Count D1
Audi 4 MB 10
Bmw 7 Toyota 15
MB 15 Audi 12
Toyota 12 vW 3
VW 10 BMW 8

What formula can I use to subtract the number of D1 from the number of column B1 according to the name of C1?

example

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Name A1 Count B1 Name C1 Count D1 Difference
Audi 4 MB 10 10 – 15 = -5
Bmw 7 Toyota 15 15 – 12 = 3
MB 15 Audi 12 12 – 4 = 8
Toyota 12 vW 3 3 – 10 = -7
VW 10 BMW 8 8 – 7 = 1

>Solution :

You can use this formula:

=D2-INDEX($B$2:$B$6,MATCH(C2,$A$2:$A$6,0))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading