Solved

match formula

Posted on 2014-03-13
3
215 Views
Last Modified: 2014-03-25
I have a basic spreadsheet with 11 columns. In columns A-C there are 500 rows of numbers (0-50), one number per cell. In columns E-K row 2 is a single row of 6 numbers (again 0-5), again one per cell.

In column D I need a formula I can copy down, which compares numbers in columns A-C (rows 1-500) which checks for matches with the numbers in row 2 E-K.

So for example if

A2 = 13
B2=6
C2=42

And the data in rows E-K were
E2 =1
F2 = 19
G2 = 18
H2=33
I2=40
J2=6

Then D2 should say "1", as there is 1 match.
0
Comment
Question by:pma111
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 24

Accepted Solution

by:
Steve earned 167 total points
ID: 39926216
Would this work in D2 coplied down:

=SUMPRODUCT(COUNTIF(A2:C2,E2:K2))
0
 
LVL 50

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 167 total points
ID: 39926222
Hi,

in D2 pls try

=COUNTIF(E2:J2,A2)+COUNTIF(E2:J2,B2)+COUNTIF(E2:J2,C2)

Open in new window

I used E to J for 6 numbers

Regards
0
 
LVL 32

Assisted Solution

by:Paul Sauvé
Paul Sauvé earned 166 total points
ID: 39926608
Hi - don't forget to put the $ sign in front of the 2s in (E2:J2,A2): i.e. E$2:J$2.

This way you can copy the formula to the 500 rows so the E2:J2 rows will not increase to E3:J3, E4:J4... as you copy in column D.

=COUNTIF(E$2:J$2,A2)+COUNTIF(E$2:J2,B$2)+COUNTIF(E$2:J$2,C2)

or

=SUMPRODUCT(COUNTIF(A2:C2,E$2:K$2))
Countif-example.xlsx
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question