Aging with if statement

dmxcasper2

Board Regular
Joined
Mar 21, 2012
Messages
65
Problem Statement:

For Row 2 I'm using =today()-A1
For Row 3 I need a a formula that perform the following logic statement under these conditions:


  • If Column B is blank then calculate using =today()-A1
  • If Column B has a date then calculate Column A - Column B
  • If Column A has a non date value like "TBA", then Column C should remain blank

Is it possible to keep Column values a positive integers.

Column AColumn BColumn C - Aging
11/05/201812/01/201826
11/05/201830

<tbody>
</tbody>

 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
The formula would be in Column. Example shown below: C2, C3 and on.

Column AColumn BColumn C - Aging
11/05/201812/01/201826
11/05/201830

<tbody>
</tbody>
 
Upvote 0
or

=IF(OR(A2="",ISTEXT(A2)),"",IF(ISNUMBER(B2),A2-B2,TODAY()-A2))

Good point i should have included where there is no data in the A column if they plan to drag this down further than the data.

=IF(OR(ISTEXT(A1), A1=""),"",IF(ISBLANK(B1),TODAY()-A1,B1-A1))
 
Upvote 0
Hi,

This would also work:


Book1
ABC
111/5/201812/1/201826
211/5/201830
3
4TBA
Sheet378
Cell Formulas
RangeFormula
C1=IF(N(A1),IF(B1,B1,TODAY())-A1,"")


Formula copied down.
 
Upvote 0

Forum statistics

Threads
1,214,531
Messages
6,120,073
Members
448,943
Latest member
sharmarick

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