Excel formula to return the latest data in a row range that is not equal to a specific word

p3gladiator

New Member
Joined
Oct 11, 2021
Messages
8
Office Version
  1. 2010
Platform
  1. Windows
Hello all,

I need some help, please.

I have a spreadsheet that has a list of several hundred employees in one column and columns for each payroll week with an "A", for active "T" for Termed and "NOR" for Not on report.
I need an excel formula that will return the last data entered that is not equal to "NOR".

Example:

Name08/05/202108/12/202108/19/202108/26/202109/02/202109/02/202109/09/202109/16/202109/23/202109/30/2021Need formula that will return last A or T
Mickey mouseAAAATNORNORNORNORNORT
Donald DuckAAAAAAAAANORA

Thanks for your assistance
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
When your data starts in A1:

Excel Formula:
=LOOKUP(2,1/(B2:K2<>"NOR"),$B$1:$K$1)
 
Upvote 0
Thank you so much but, can you please tell me what the 2,1 is referring to? I understand the rest of it.
my range for the first person is F3:AH3.

Thanks again
 
Upvote 0
Hello friend

See if is this that are you looking for:

Mickey Mouse - =INDEX($B$1:$K$1,0,LARGE(IF(B2:K2="A",COLUMN($A$4:$J$4),IF(B2:K2="T",COLUMN(B2:K2),FALSE)),1))
Donald Duck - ==INDEX($B$1:$K$1,0,LARGE(IF(B3:K3="A",COLUMN($A$4:$J$4),IF(B3:K3="T",COLUMN(B3:K3),FALSE)),1))
 
Upvote 0
Hello friend

See if is this that are you looking for:

Mickey Mouse - =INDEX($B$1:$K$1,0,LARGE(IF(B2:K2="A",COLUMN($A$4:$J$4),IF(B2:K2="T",COLUMN(B2:K2),FALSE)),1))
Donald Duck - ==INDEX($B$1:$K$1,0,LARGE(IF(B3:K3="A",COLUMN($A$4:$J$4),IF(B3:K3="T",COLUMN(B3:K3),FALSE)),1))
thank you, this is awesome but, this returns the date and I need it to return the A or T.
 
Upvote 0
  • If the LOOKUP function can't find the lookup_value, the function matches the largest value in lookup_vector that is less than or equal to lookup_value.
So the formula is searching for the first 1 in the searcharray. From right to left.

Excel Formula:
=LOOKUP(2,1/((F3:AH3<>"NOR")*(F3:AH3<>"")),F3:AH3)
 
Upvote 0
Solution
  • If the LOOKUP function can't find the lookup_value, the function matches the largest value in lookup_vector that is less than or equal to lookup_value.
So the formula is searching for the first 1 in the searcharray. From right to left.

Excel Formula:
=LOOKUP(2,1/((F3:AH3<>"NOR")*(F3:AH3<>"")),F3:AH3)
Thank you very much and for the explaination! Your Formula worked perfectly!
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,370
Members
449,080
Latest member
Armadillos

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