If Formula

rentonhighlands

Board Regular
Joined
Jul 31, 2014
Messages
121
Office Version
  1. 365
Platform
  1. Windows
Please write a formula
I have two columns, estimated Date and Delivery date.
If a date is today or from the past then copy that date into the Delivery date column and remove it from the estimated date column.

Carrier Estimated Delivery DateDelivery Date
12/31/2024
12/31/2024
12/5/2024
 

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.
A cell can either have a hard-coded value or a formula in it, but never both at the same time.
So you are not going to be able to "blank out/remove" a hard-coded value from a cell with a formula.
To do something like that would probably require VBA.

Are you open to a VBA solution?
If so, please let us know the exact ranges these date occur in, so we can write the code accordingly.
 
Upvote 0
What's the reason for removing the date in the Estimated column? Formula logic, you could use the Delivery column if not blank. Need more context on what you're trying to accomplish.
 
Upvote 0
Why do you need the Estimated Date to be cleared out after the other column has a date in it?
In your reporting formulas, you should be able to use logic looking at both those columns to get whatever results you need.

If your provide more details of your reporting formulas, we can probably help you update them to get what you want.
 
Upvote 0
I am reporting per tier (count) what is estimated delivery, and delivered. I pull vlookup from project sheets to pull in dates. I can't have dates in both columns then the count will be wrong.

TierCarrier Estimated Delivery DateDelivery Date
1/31/2025
5/31/2025
5/31/2025
 
Upvote 0
I can't have dates in both columns then the count will be wrong.
Sure you can, you just have to adjust your count formula (which is what I am getting at).
You can use a COUNTIFS formula to count how many records have dates in both columns versus how many have dates in just one column.
 
Upvote 0
For example, see here:

1733763364671.png


Formula for cell B2 (and copy down to B4):
Excel Formula:
=IF(A2<=TODAY(),A2,"")

Formula in cell B6:
Excel Formula:
=COUNTIF(B2:B4,">0")

Formula in cell B7:
Excel Formula:
=COUNTIFS(A2:A4,">0",B2:B4,"")
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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