Lookup formula to determine activity use

jmac0027

New Member
Joined
Sep 9, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,

My excel project is used to track activity based on date. The employee who has the "most days since last use" is given priority when the activity becomes available.
  • The yellow highlighted cell represents the current date.
  • The green highlighted cells calculates how many days it has been since last use. The yellow highlight represents the current date.

LOOKUP(2,1/(D5:P5>0),TODAY() - D2:P2)
The problem with the current formula is that entering data beyond the current date affects outcome. I am hoping someone can suggest a solution that only count from the current date backwards until a "1" is encountered.

I can't use vba or macros.

Thank you!!!


Screen Shot 2024-09-08 at 10.04.48 PM.png

Excel Formula Test.xlsx
ABCDEFGHIJKLMNO
1# Days from current date08/26/2408/27/2408/28/2408/29/2408/30/2408/31/2409/01/2409/02/2409/03/2409/04/2409/05/2409/06/2409/07/24
226272829303101020304050607
3MONTUEWEDTHUFRISATSUNMONTUEWEDTHUFRISAT
4Employee #12111111
5Employee #2511110
6Employee #321111
7Employee #441
8Employee #5111
9Employee #6211111
10Employee #741111
11Employee #831111
12Employee #921111
13Employee #102111
14Employee #113111
Sheet1
Cell Formulas
RangeFormula
B4B4=LOOKUP(2,1/(C4:O4>0),TODAY() - C1:O1)
B5:B6B5=LOOKUP(2,1/(C5:O5>0),TODAY() - C1:O1)
B7B7=LOOKUP(2,1/(C7:O7>0),TODAY() - C1:O1)
B8B8=LOOKUP(2,1/(C8:O8>0),TODAY() - C1:O1)
B9B9=LOOKUP(2,1/(C9:O9>0),TODAY() - C1:N1)
B10B10=LOOKUP(2,1/(C10:O10>0),TODAY() - C1:O1)
B11B11=LOOKUP(2,1/(C11:O11>0),TODAY() - C1:O1)
B12B12=LOOKUP(2,1/(C12:O12>0),TODAY() - C1:O1)
B13B13=LOOKUP(2,1/(C13:O13>0),TODAY() - C1:O1)
B14B14=LOOKUP(2,1/(C14:O14>0),TODAY() - C1:O1)
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Extend dates up to U column. If required to any column and change the formula accordingly.
In B4 copied down.
Excel Formula:
=LOOKUP(2,1/((C4:U4>0)*($C$1:$U$1<=TODAY())),TODAY() - $C$1:$U$1)
 
Upvote 0
Solution
Works great! I modified slightly so current day not included: =LOOKUP(2,1/((C4:U4>0)*($C$1:$U$1<=(TODAY()-1))),(TODAY()-1) - $C$1:$U$1)

Really appreciate your help. I had originally tried XLOOKUP but never got it to work.

Cheers!
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,793
Members
451,589
Latest member
Harold14

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