Last matching Value in multiple Columns

Emre06

New Member
Joined
Sep 27, 2023
Messages
19
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello, i have 2 Columns containing guards's names. ( I tried to use "maxifs" function but it is working only for one column ) My Question is: I need formula to find "Last Date" of "John Fizz" in "Beach"?

Kitap1 (version 1).xlsb
ABCD
1DateGuard 1Guard 2Location
21.02.2023Mike RogersRomeo LoiLobby
32.02.2023John FizzTaric BenBeach
43.02.2023Alan DuskLora IanHotel
54.02.2023Clark KentJohn FizzBeach
Sayfa1
 
By the way is there a way to conditional format #N/A error ?
 
Upvote 0
I was going to throw that in but opted to keep it to the essentials in the first pass.
Just wrap the whole thing in an IFERROR,
So before the Max add
IFERROR(
then at the end add
,"")
Or you could but something like Not Found between the quotes.
Thank you very much for your understanding, now very tidy page I will be working with :)
 
Upvote 0
I have one more question about same formula: I am trying to use * asterisk like "*beach*" for this table. How can I make this work ( "Last Date" of "John Fizz" in "Beach"? " )

Kitap1.xlsx
ABCD
1DateGuard 1Guard 2Location
21.02.2023Mike RogersRomeo LoiLobby
32.02.2023John FizzTaric BenBeach
43.02.2023Alan DuskLora IanHotel
54.02.2023Clark KentJohn FizzBeach,Lobby
6
7Beach
8John Fizz0
Sayfa1
Cell Formulas
RangeFormula
B8B8=MAX(FILTER(A:A,(B:B="John Fizz")*(D:D="*Beach*")+(C:C="John Fizz")*(D:D="*Beach*")))
 
Upvote 0
Try this. I have also rearranged it a little so you don't need to evaluate the location twice.

Excel Formula:
=MAX(FILTER(A:A,((B:B="John Fizz")+(C:C="John Fizz"))*ISNUMBER(SEARCH("Beach",D:D))))
Thank you very much Sir, you are amazing ! Do you know how can I find John Fizz has been in beach ? (2 times in this table)

I tried to change MAX with Countif but it didn't worked, Sorry.
 
Upvote 0
Change MAX to COUNTA
Excel Formula:
=COUNTA(FILTER(A:A,((B:B= "John FIzz")+(C:C="John Fizz"))*ISNUMBER(SEARCH("Beach",D:D))))
Thank you, but having a problem now. John fizz is 2 times in beach and counting correctly but, it is also counting 1 for others who hasn't been in beach.
 
Upvote 0
My mistake, the error will always return a count of 1. How about this?
Excel Formula:
=SUMPRODUCT(--NOT(ISERROR(FILTER(A:A,((B:B="John Fizz")+(C:C="John Fizz"))*ISNUMBER(SEARCH("Beach",D:D))))))
Thank you very much, customization took very long but it is working now. :)
 
Upvote 0
Try this. I have also rearranged it a little so you don't need to evaluate the location twice.

Excel Formula:
=MAX(FILTER(A:A,((B:B="John Fizz")+(C:C="John Fizz"))*ISNUMBER(SEARCH("Beach",D:D))))
Hello again, now I am having a new problem. John Fizz can be in multiple places now on the same day (Beach, Hotel), but I just wanted to find the beach version. If I use I wanted to use Wildcard but the filter giving error, how can I solve this ?
 
Upvote 0

Forum statistics

Threads
1,216,149
Messages
6,129,149
Members
449,488
Latest member
qh017

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