Calculate using blanks

Andrew Watson

New Member
Joined
Feb 3, 2016
Messages
13
Office Version
  1. 365
Platform
  1. Windows
I have a report which I download from a database and I determine if a supplier is late with their delivery or not. If we update the vendors 'promise date' the original 'promise date' is transferred to the 'promise original' column. Currently when determining if a vendor is late I use an IF formula to determine if they are 'LATE' or 'ON TIME' using the differences in the 'Close Date' and 'Promise Date' Columns. I would now like to initially look at the 'Promise Original' and calculate off this date versus 'Close Date' in the first instance if they are late or not. If the cell in 'Promise Original' is blank then I would like to calculate from the 'Close Date' and 'Promise Date' Columns. I've tried using a few variations of an IF formula and also adding in an OR as well but I keep getting errors.

Can anyone help with his calculation?

Book1
BCDE
1CLOSE DATEPROMISE DATEPROMISE ORIGINALON TIME
219/07/20219/07/20216/07/2021LATE
319/07/20219/07/2021LATE
49/07/20219/07/2021ON TIME
58/07/20219/07/2021ON TIME
Sheet1
Cell Formulas
RangeFormula
E2:E5E2=IF(B2<=C2,"ON TIME",IF(B2>C2,"LATE"))
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
How about:
View My formula at Column F:
Book1(AutoRecovered).xlsm
ABCDEFG
1CLOSE DATEPROMISE DATEPROMISE ORIGINALON TIME
27/19/20217/9/20217/6/2021LATELate
37/19/20217/9/2021LATELate
47/9/20217/9/2021ON TIMEON TIME
57/8/20217/9/2021ON TIMEON TIME
6
Sheet3
Cell Formulas
RangeFormula
E2:E5E2=IF(B2<=C2,"ON TIME",IF(B2>C2,"LATE"))
F2:F5F2=IF(D2="",IF(B2<=C2,"ON TIME","Late"),IF(B2<=D2,"ON TIME","Late"))
 
Upvote 0
Solution
How about:
View My formula at Column F:
Book1(AutoRecovered).xlsm
ABCDEFG
1CLOSE DATEPROMISE DATEPROMISE ORIGINALON TIME
27/19/20217/9/20217/6/2021LATELate
37/19/20217/9/2021LATELate
47/9/20217/9/2021ON TIMEON TIME
57/8/20217/9/2021ON TIMEON TIME
6
Sheet3
Cell Formulas
RangeFormula
E2:E5E2=IF(B2<=C2,"ON TIME",IF(B2>C2,"LATE"))
F2:F5F2=IF(D2="",IF(B2<=C2,"ON TIME","Late"),IF(B2<=D2,"ON TIME","Late"))

Hi maabadi,

That worked great thank you very much. I did forget one other cell where a calculation is completed. It needs to calculate the the days. Currently using a very simple formula and I've tried adapting your response to this cell but my knowledge isn't that great to figure it our without asking. It is the same as before. If the value is blank it calculates the days late between cells B2 & C2 but if there is a value in cell D2 it would then calculate using B2 & D2.

Any thoughts?

Book1
BCDEFGHIJK
1CLOSE DATEPROMISE DATEPROMISE ORIGINALON TIMEDAYS LATE
219/07/20219/07/20216/07/2021LATELate10
319/07/20219/07/2021LATELate10
49/07/20219/07/2021ON TIMEON TIME0
58/07/20219/07/2021ON TIMEON TIME-1
Sheet1
Cell Formulas
RangeFormula
E2:E5E2=IF(B2<=C2,"ON TIME",IF(B2>C2,"LATE"))
F2:F5F2=IF(D2="",IF(B2<=C2,"ON TIME","Late"),IF(B2<=D2,"ON TIME","Late"))
J2:J5J2=B2-C2
 
Upvote 0
You're Welcome & Thanks for Follow-up.
 
Upvote 0
In relation to the original question, I would assume that if a second promise date exists it is always after the original promise date?
If that is the case then you could use the column E formula below.
If my assumption is not correct, then you could use the column F formula, still considerably shorter than the earlier formula.

21 09 01.xlsm
ABCDEF
1CLOSE DATEPROMISE DATEPROMISE ORIGINALON TIME
219-Jul-2109-Jul-2107-Jun-21LATELATE
319-Jul-2109-Jul-21LATELATE
409-Jul-2109-Jul-21ON TIMEON TIME
508-Jul-2109-Jul-21ON TIMEON TIME
On Time Late
Cell Formulas
RangeFormula
E2:E5E2=IF(B2<=MIN(C2,D2),"ON TIME","LATE")
F2:F5F2=IF(B2<=IF(D2="",C2,D2),"ON TIME","LATE")
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,039
Members
448,940
Latest member
mdusw

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