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
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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))))))
 
Upvote 1
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
FYI - SumProduct will make in backward compatible but in Excel 2021 and greater (incl MS365) just Sum will work.
 
Upvote 1
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
I don't understand what is different.
This ISNUMBER(SEARCH("Beach",D:D)), is the equivalent of looking for *Beach*
So what is it not doing ?
 
Upvote 1

Forum statistics

Threads
1,215,084
Messages
6,123,021
Members
449,092
Latest member
ikke

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