counting celss in two ranges in the same row

mahat

New Member
Joined
Aug 30, 2011
Messages
20
I have a problem about counting cells in the same row.
GA22:GZ22 contain numbers or letters, EA22:EZ22 similarly contain numbers and/or letters. I would like to count cells that satisfy one condition for the first range and another condition for the second range. For eg., For the first range the condition is =2, and then the condition for the corresponding cell in range 2 would be 1. If both these values exist then the count should be 1.
In other words, If GA22=3 or A, EA22=1 or B, then the count =1.
What would be the formula?
2. In fact in my spread sheet, the cells GA22 and EA22 alternate in the same row, but I can rearrange like above.
3. Is it that the cells in the same row cannot be counted for satisfying conditions?
If so, What would be an easy way for rearranging the spread sheet to bring the values in the second row into a different row. However the values belong to the same record.
Any help is welcome.
Thanks
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I have a problem about counting cells in the same row.
GA22:GZ22 contain numbers or letters, EA22:EZ22 similarly contain numbers and/or letters. I would like to count cells that satisfy one condition for the first range and another condition for the second range. For eg., For the first range the condition is =2, and then the condition for the corresponding cell in range 2 would be 1. If both these values exist then the count should be 1.
In other words, If GA22=3 or A, EA22=1 or B, then the count =1.
What would be the formula?
2. In fact in my spread sheet, the cells GA22 and EA22 alternate in the same row, but I can rearrange like above.
3. Is it that the cells in the same row cannot be counted for satisfying conditions?
If so, What would be an easy way for rearranging the spread sheet to bring the values in the second row into a different row. However the values belong to the same record.
Any help is welcome.
Thanks
Your explanation is extremely confusing. :confused:
 
Upvote 0
There are two ranges being considered in the same row. The first range is, say GA22:GZ22 which has values 0,3,A. The second range, also in the same row is HA22:HZ22 has values 0,1,B. I am interested in finding for every cell, say for eg., GA22 which has value 3 or A, the corresponding cell, i.e., HA22, if has the value 1 or B and count the cell as 1. If for any cell in the first range, the value is 0, then it means that it is no considered for counting. Only if the cell in the first range has either 3 or A and then the corresponding cell in the second range has 1 or B then the count is 1. I hope I have clarified.
The next two questions arise if there is no solution for this.
Thanks and sorry for the confusion.
 
Upvote 0
There are two ranges being considered in the same row. The first range is, say GA22:GZ22 which has values 0,3,A. The second range, also in the same row is HA22:HZ22 has values 0,1,B. I am interested in finding for every cell, say for eg., GA22 which has value 3 or A, the corresponding cell, i.e., HA22, if has the value 1 or B and count the cell as 1. If for any cell in the first range, the value is 0, then it means that it is no considered for counting. Only if the cell in the first range has either 3 or A and then the corresponding cell in the second range has 1 or B then the count is 1. I hope I have clarified.
The next two questions arise if there is no solution for this.
Thanks and sorry for the confusion.
If I understand, try this...

=SUMPRODUCT(--(ISNUMBER(MATCH(GA22:GZ22,{3,"A"},0))),--(ISNUMBER(MATCH(HA22:HZ22,{1,"B"},0))))
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,729
Members
452,939
Latest member
WCrawford

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