Formula needs tweeked

Noxqss38242

Board Regular
Joined
Sep 15, 2017
Messages
223
Office Version
  1. 2016
=IF(N327356="A",0,IFNA(AB327356-LOOKUP(2,1/(N$2:N327356="A")/(B$2:B327356=B327356),AB$2:AB327356),""))

In this formula I'm asking it to search for "A" and how long it has been since "A" was done based off the same identifier in column B.

What I'm wondering is, can this code be modified to look for "A", "B", "C", "E", and "I" at the same time? So instead of possibly 200 days lapsed just for "A" it will show 45 days lapsed based off this new information it is also looking for.

Column B = Numeral Number Assigned to a Truck
Column N = Work Code. ie: A, B, C, D, E, I
Column AB = Date Work Done
 
Maybe:

Excel Formula:
=IF(N163643="B",0,IFNA(LOOKUP(2,1/ISNUMBER(SEARCH(N$2:N163643,"ABCEI"))/(B$2:B163643=B163643),AF$2:AF163643),""))
Genius, pure genius. It treats "blanks" as a good code though, so luckily I only had to fill in 116 blanks of over 250,000 rows. No big deal, it works! Much appreciated!
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,215,256
Messages
6,123,914
Members
449,132
Latest member
Rosie14

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