lookup question / count question

j4ymf

Well-known Member
Joined
Apr 28, 2003
Messages
753
Office Version
  1. 365
Platform
  1. Windows
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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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
 
Upvote 0
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
 
Upvote 0
morning michael

i get N/A errors with both of those?
 
Upvote 0
Are all the ranges correct ??
It works fine for me !
 
Upvote 0
michael

i need to count the values in G:G where it finds MAPK in D:D and RED in N:N
 
Upvote 0
assumes there may be blanks in Col "G"
Code:
=SUMPRODUCT(--(D1:D1000="MAPK")*(N1:N1000="RED")*(G1:G1000<>""))
 
Upvote 0
hi michael
ive just added it up manually and im expecting my results to be 1440 and im getting 14 as my results
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,224,352
Messages
6,178,068
Members
452,822
Latest member
MtC

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top