Lookup problem

arlene_fool

Board Regular
Joined
Feb 17, 2007
Messages
55
I am working on a spreadsheet to track my companys accounts receivables, i want to it to age based on todays date, whereas before i just aged it all to the end of the month. i have created this formula

=LOOKUP(($D$5-F26),{1,30,61,91,0},{"Current","30-60","61-90","90+",""})

where D5 is =today() and F26 is the invoice date.

most of it works, except any invoices over 92days are blank, when they should say "90+"
 

Some videos you may like

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

arlene_fool

Board Regular
Joined
Feb 17, 2007
Messages
55
i need the blank space though. we leave blank spaces between different customers. and i dont want it to tell me its "current" etc.
 

Barrie Davidson

MrExcel MVP
Joined
Feb 10, 2002
Messages
2,330
i need the blank space though. we leave blank spaces between different customers. and i dont want it to tell me its "current" etc.

I don't understand your requirements....My formula will provide you the correct ageing description based on the invoice date being in F27 and the current date in D5. Can you clarify what you're looking for?
 

arlene_fool

Board Regular
Joined
Feb 17, 2007
Messages
55
actually i figured it out by mistake. if the date cell is left blank and you subtract it from todays date, it doesnt equal 0, it makes some big number, so when i changed that 0 to 1000, and it works now.

but thank you, now i just need to get the conditional formatting to work.
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Just add this to Barrie's Formula
Code:
=IF(F26,LOOKUP(($D$5-F26),{0,30,61,91},{"Current","30-60","61-90","90+"}),"")
Also, why do you need $D$5? You could use
Code:
=IF(F26,LOOKUP((TODAY()-F26),{0,30,61,91},{"Current","30-60","61-90","90+"}),"")
lenze
 

Watch MrExcel Video

Forum statistics

Threads
1,123,531
Messages
5,602,209
Members
414,513
Latest member
junbuggle

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
Top