# lookup question / count question

#### j4ymf

##### Well-known Member
Hello

i was woundering how do i write a query to lookup this

my range is A1:N1000

i want to count the total of G:G
where D:D = MAPK
and N:N = RED

does that make sence

Thanks jason

### Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
maybe this...
=countifs(D:D,"MAPK",N:N,"RED",G:G,"<>""")

Do you want a count of values or a sum ??
Try these
Code:
``````=SUMPRODUCT(--(D1:D1000="MAPK")*(N1:N1000="RED"),G1:G1000) 'does a SUM

=SUMPRODUCT(--(D1:D1000="MAPK")*(N1:N1000="RED")) 'does a COUNT``````

thank yo FDibbins

that gave me a result of 14 and it look like it has counted how many times it has seen MPAK and RED in collum G:G i have all the results and i was expecting a larger result

any ideas

morning michael

i get N/A errors with both of those?

Are all the ranges correct ??
It works fine for me !

michael

i need to count the values in G:G where it finds MAPK in D:D and RED in N:N

assumes there may be blanks in Col "G"
Code:
``=SUMPRODUCT(--(D1:D1000="MAPK")*(N1:N1000="RED")*(G1:G1000<>""))``

hi michael
ive just added it up manually and im expecting my results to be 1440 and im getting 14 as my results

The first example in my original post does exactly that !
Code:
``=SUMPRODUCT(--(D1:D1000="MAPK")*(N1:N1000="RED"),G1:G1000) 'this will do a SUM``

Replies
5
Views
405
Replies
6
Views
411
Replies
39
Views
2K
Replies
1
Views
523
Replies
3
Views
124

1,203,067
Messages
6,053,334
Members
444,654
Latest member
Rich Cohen

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back