SOLVED

Aging Report

%3CLINGO-SUB%20id%3D%22lingo-sub-2906147%22%20slang%3D%22en-US%22%3EAging%20Report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2906147%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20Afternoon!%20I'm%20aging%20sales%20data%20but%20need%20it%20to%20stop%20aging%20when%20an%20item%20is%20sold.%20I%20have%20start%20date(G5)%20sale%20date%20(H5)%20and%20days%20aged%20as%20of%20today%20columns.%20This%20is%20my%20formula%20but%20it's%20not%20working.%20I%20keep%20getting%20an%20excel%20error.%26nbsp%3B%20I'm%20trying%20to%20tell%20it%20if%20there%20is%20no%20date%20in%20H5%2C%20use%20today's%20date.%20Each%20formula%20works%20independently.%26nbsp%3B%20Any%20ideas%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DDATEDIF(G5%2CH5%2C%22d%22)%2CIF(H5%26lt%3B1(TODAY()-G5%2C0))%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2906147%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2906164%22%20slang%3D%22en-US%22%3ERe%3A%20Aging%20Report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2906164%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1201382%22%20target%3D%22_blank%22%3E%40SARAWALL007%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20are%20other%20ways%20to%20do%20it%2C%20but%20I%20will%20keep%20your%20approach%20as%20adjusted%20below%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DIF(H5%26lt%3B1%2CTODAY()-G5%2CDATEDIF(G5%2CH5%2C%22d%22))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2906180%22%20slang%3D%22en-US%22%3ERe%3A%20Aging%20Report%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2906180%22%20slang%3D%22en-US%22%3ENice!%20Thanks.%20Something%20simpler%3F%3C%2FLINGO-BODY%3E
New Contributor

Good Afternoon! I'm aging sales data but need it to stop aging when an item is sold. I have start date(G5) sale date (H5) and days aged as of today columns. This is my formula but it's not working. I keep getting an excel error.  I'm trying to tell it if there is no date in H5, use today's date. Each formula works independently.  Any ideas? 

 

=DATEDIF(G5,H5,"d"),IF(H5<1(TODAY()-G5,0))

3 Replies
best response confirmed by SARAWALL007 (New Contributor)
Solution

@SARAWALL007 

There are other ways to do it, but I will keep your approach as adjusted below

=IF(H5<1,TODAY()-G5,DATEDIF(G5,H5,"d"))

 

Nice! Thanks. Something simpler?

@SARAWALL007 

Perhaps

=IF( H5, H5, TODAY() ) - G5