Need a Formula

SodaAddict

New Member
Joined
Jul 4, 2008
Messages
4
Basically, I have a spreadsheet where there's a ton of data and I need to have a formula that searches through one column row by row, then goes to another column on the same row if the first one returns a certain value. Then, once in the second column, I want it to add a number to a count if that reurns a certain value.

I realize this may sound complicated, so I will put some sample data below.

1 2 3

A Low Yes Yes
B Middle No Yes
C High Yes Yes
D Low No No
E High Yes No
F Low No Yes
G Middle No No


Now, what I need to be able to do is have the formula search through column 1 until it sees "Low", then jump to column 3 on the same row and see if that says "Yes", and if so, count the number. Thus, in this example, I want the formula to return 2, because there are two places (Row A and Row F)where Column 1 contains "Low" and Column 3 contains "Yes". Then, I want to repeat this formula for other columns.

I tried doing it with Countif, but I could only make that work if it was one column. If you need any more info, feel free to ask.
 

Some videos you may like

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Makrini

Well-known Member
Joined
May 22, 2007
Messages
1,035
=SUMPRODUCT(--(B1:B100="Low"),--(D1:D100="Yes"))

should work for you...
 

Makrini

Well-known Member
Joined
May 22, 2007
Messages
1,035
Sure..

Sumproduct - obviously multiplies things up...


--(B1:B100="Low")

B1:B100="Low" would return "True","False","False","True".....

the -- turns it into 1 for true and 0 for false...

i.e it returns 1,0,0,1....

multiply that by the result of ... --(D1:D100="Yes")
(1,1,1,0...)

is 1 * 1
0*1
0*1
1*0

etc

Basically returning a 1 every time both values are true - or returning 0 otherwise

Then it adds all the 1's...
 

Watch MrExcel Video

Forum statistics

Threads
1,122,567
Messages
5,596,907
Members
414,110
Latest member
docops

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
Top