Stop a formula if a cell has a certain text and show the last count where it stopped

Alishk

New Member
Joined
Jan 28, 2021
Messages
11
Office Version
  1. 2016
Platform
  1. Windows
Hello experts,
So i am stuck here.

B = has a past date "01/10/21"
F = has a shipment date (if shipped)
G = has either "Shipped" "Processing" or "Canceled"
H = is counting days =TODAY()-$B2

what I want either
if F has a date
H should stop counting days further and show counted days (the difference between B date and F Date)

OR
if G is either "Shipped" or "Cancelled"
H should stop counting days further and show counted days till G value is shipped or canceled.


i also attached my sheets picture
 

Attachments

  • 12sd.jpg
    12sd.jpg
    98 KB · Views: 93

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi! Try this
=IF(F2="",TODAY()-B2,"")

or this!
=IF(F2="",TODAY()-B2,F2-B2)
 
Upvote 0
Yes this solves the problem, with new problems accruing,
if F2 and B2 both are empty it starts showing 44224 Days. It should keep it black until B2 is populated.
 
Upvote 0
Yes this solves the problem, with new problems accruing,
if F2 and B2 both are empty it starts showing 44224 Days. It should keep it black until B2 is populated.
Hi! Try this
=IF(F2="",TODAY()-B2,"")

or this!
=IF(F2="",TODAY()-B2,F2-B2)
 
Upvote 0
Try This!
=if(And(f2="",B2=""),"",IF(F2="",TODAY()-B2,F2-B2))
 
Upvote 0
Try This!
=if(And(f2="",B2=""),"",IF(F2="",TODAY()-B2,F2-B2))
ok i tried on a new sheet. now its working but still if F2 has a date and B2 is black its showing 44224 days :(
 
Upvote 0
=if(And(f2="",B2=""),"",if(b2="","",IF(F2="",TODAY()-B2,F2-B2)))

Try!
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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