Aging formula with variables/conditions

dmxcasper2

Board Regular
Joined
Mar 21, 2012
Messages
65


Link to the file: (Please see tab called "Master")
https://drive.google.com/open?id=186WZJRjc4q7kt4NyivnEsmzQOZ9atg9q


Problem statement:


(Option A - Preferred)
Step 1.) If a date exists in the following columns (O, R, U, X, AA), display the latest date in column AJ.
Step 2.) In column AS display numerical aging from the following logic statement (date in column AJ minus date in column AK, if AK is blank then minus it from ()today formula).


(Option B)
In column AS, display sum of AJ minus AK, however if column AK is blank, then display sum of AJ minus today's date.


I've been at this for hours trying out various combinations of -sumif formulas, but I can't seem to apply the above logic to a concise statement.
 
Last edited:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi Casper,

Can you use this?


Book1
ORUXAAAJAKAS
1no Historyno History06-11-1824-11-1806-11-1807-11-18-1
2no Historyno History01-11-1817-11-1801-11-1807-11-18-6
3no Historyno History29-09-1826-11-1829-09-1814-11-18-46
4no Historyno History01-11-1824-11-1801-11-1807-11-18-6
5no Historyno History01-11-1824-11-1801-11-18-15
Sheet1
Cell Formulas
RangeFormula
AS1=IF(AK1="",AJ1-TODAY(),AJ1-AK1)
AJ1{=IF(O1:X1>1,SMALL(O1:X1,1))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thank you RasGhul.

Also, for invalid entries that cannot be calculated because there are no dates those columns, how could substitute invalid "-43420" with a blank data in the aging cell?

So if aging cannot be calculated because there are no dates in column AJ and AK, then the result should be "blank" in the aging cell (AS).
 
Upvote 0
You could use,

Code:
=IF(AND(AJ1="",AK1=""),"",IF(AK1="",AJ1-TODAY(),AJ1-AK1))

The original AJ formula should include the AA column;

Code:
=IF(O1:AA1>1,SMALL(O1:AA1,1),"")
(Remember to use CTRL+Shift+Enter for array)

**Note that the AJ formula may be prone to errors if numeric values are entered into the hidden cells between O1-AA1.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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