differences between 3

  • Thread starter Thread starter dhealy
  • Start date Start date
D

dhealy

I have 3 columns with dates in them with one column being the constant. I
need to find the number of days between the constant date and one column if
the other column is blank, if there is a date in the 3rd column then I need
to use that date with the constant. Help...
 
Assuming column A if one columns, B is column that can be blank, and C is
your constant:

=IF(B2="",ABS(A2-C2),ABS(B2-C2))

The absolute function is included to cover both scenarios in which constant
could be less than or greater than date in A2/B2. Feel free to take it out if
you don't need it.
 
Assuming column A if one columns, B is column that can be blank, and C is
your constant:

=IF(B2="",ABS(A2-C2),ABS(B2-C2))

The absolute function is included to cover both scenarios in which constant
could be less than or greater than date in A2/B2. Feel free to take it out if
you don't need it.
 
one way

A1 is the constant date
B1 is normally used
C1 is sometimes blank

enter in D1

=IF(C1<>0,C1-A1,B1-A1)
 
one way

A1 is the constant date
B1 is normally used
C1 is sometimes blank

enter in D1

=IF(C1<>0,C1-A1,B1-A1)
 
Thanks Niek, that is exactly what I needed to achieve.
Enjoy your day,
deb
 
Thanks Niek, that is exactly what I needed to achieve.
Enjoy your day,
deb
 
Hi Luke,
thanks for your input but the formula didn't work out for the "sometimes"
columm I use. I have kept your formula for other worksheets that this will
fit into.
dhealy
 
Thanks Bill,
for some reason I could not get the "sometimes" columm to adjust correctly
but thank you for your input. Your outcome could come in handy for me on
another worksheet.
Greetings from Michigan
 
Hi Luke,
thanks for your input but the formula didn't work out for the "sometimes"
columm I use. I have kept your formula for other worksheets that this will
fit into.
dhealy
 
Thanks Bill,
for some reason I could not get the "sometimes" columm to adjust correctly
but thank you for your input. Your outcome could come in handy for me on
another worksheet.
Greetings from Michigan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top