Check if last 3 cells in a row are "A" if so = 1

lars1565

New Member
Joined
Apr 18, 2016
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
I have a spreadsheet for attendance at a school. I want to be able to flag students who have missed the last 3 days of a class. So I want a formula that will look at the last three entries of a row and see if the last three cells all contain "A." If so I would I would like it to return 1. I have found lots on averaging the last 3 cells but I can not figure how to change it so it does it what I want.
Thanks
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
I think that will only check to see if any of the last 3 values is an A, not all of them.

Perhaps:
=(COUNTIF(OFFSET(INDEX($1:1,MATCH(REPT("z",255),$1:1)),0,0,,-3),"A")=3)+0
 
Last edited:
Upvote 0
I think that will only check to see if any of the last 3 values is an A, not all of them.

Perhaps:
=(COUNTIF(OFFSET(INDEX($1:1,MATCH(REPT("z",255),$1:1)),0,0,,-3),"A")=3)+0

You are right. The OP mentions "all", so COUNTIF instead of ISNUMBER+MATCH will do.
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,316
Members
452,634
Latest member
cpostell

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