germandiazm
New Member
- Joined
- May 9, 2017
- Messages
- 11
Can anyone help me with the following excel problem?
I have a table that has dates on the first column an ID number in the first row and on the second row we write down how many days left from today's date.
The days left correspond to the dates on the first column and we are doing that manually on a daily basis.
What formula can I use in B2:F2 that would search the first non-blank cell in that column, look for the date on the same row on column A and subtract that date from today's date?
If date has already past, return value to be 0.
[TABLE="width: 400"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Car[/TD]
[TD]01[/TD]
[TD]02[/TD]
[TD]03[/TD]
[TD]04[/TD]
[TD]05[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Days until departure[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]6[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]1/06/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]2/06/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]3/06/2018[/TD]
[TD]43[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]4/06/2018[/TD]
[TD]23[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]5/06/2018[/TD]
[TD]54[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]6/06/2018[/TD]
[TD][/TD]
[TD]45[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]7/06/2018[/TD]
[TD][/TD]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]8/06/2018[/TD]
[TD][/TD]
[TD]43[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]9/06/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD]43[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]10/06/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD]34[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]11/06/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]23[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]12/06/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]23[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]13/06/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]14/06/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]65[/TD]
[/TR]
</tbody>[/TABLE]
Thanks,
germandiazm
I have a table that has dates on the first column an ID number in the first row and on the second row we write down how many days left from today's date.
The days left correspond to the dates on the first column and we are doing that manually on a daily basis.
What formula can I use in B2:F2 that would search the first non-blank cell in that column, look for the date on the same row on column A and subtract that date from today's date?
If date has already past, return value to be 0.
[TABLE="width: 400"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Car[/TD]
[TD]01[/TD]
[TD]02[/TD]
[TD]03[/TD]
[TD]04[/TD]
[TD]05[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Days until departure[/TD]
[TD]0[/TD]
[T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/TD]
[TD][/TD]
[TD]23[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]13/06/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]14/06/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]65[/TD]
[/TR]
</tbody>[/TABLE]
Thanks,
germandiazm