If and Query Please

certificates

Board Regular
Joined
Apr 20, 2009
Messages
127
I guess this must be relatively simple but it's too hard for me.

I have a row of cells (W11: AC11) which contain the words Bunker Shot and Putt

Cell AH 11 if fomatted to count the number of times Bunker Shot appears in the row and cell AI 11 to count the number of times Putt appears

I want to use cell AJ 11 to count the number of times Bunker Shot and Putt appear once each.

Any one help with the formula please ?

Thanks
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Robert Mika

MrExcel MVP
Joined
Jun 29, 2009
Messages
7,256
Hi certificates.
Not very clear.
Do you want to count if Bunker Shot and Putt appear once each or if there is Bunker Shot and Putt in the same cell?
 

certificates

Board Regular
Joined
Apr 20, 2009
Messages
127
No, Bunker shot and Putt will not appear in the same cell.

I want cell AJ to count the number of times Cell AH = 1 AND Cell AI = 1

If cell AI for example = 2 and AH 1, then I do not want AJ to count at all

Thanks

Antony
 

Robert Mika

MrExcel MVP
Joined
Jun 29, 2009
Messages
7,256
This formula

=IF(AND(AI11=1,AJ11=1),"Once Each","")

will look at both cells and give you answer "Once Each" only if AI=1 and AJ=1.


Is that what you after?
 

certificates

Board Regular
Joined
Apr 20, 2009
Messages
127
Thanks for your efforts.

It's not quite right but gave me a base to work with and I have this which does the trick

=IF(AND(AH11=AI11,AI11>0),1,0)

Without your suggestion I couldn't have done it

Thank you

Antony
 

Watch MrExcel Video

Forum statistics

Threads
1,122,331
Messages
5,595,541
Members
413,996
Latest member
mabelO

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