0

I have a Excel column with date in the format: d.
This shows just the day-number of the month

e.g. 2017-05-21 is shown as 21.

If this number is smaller than the one in the column above, I would like to add a text to the field before.

So if
B2 is 31.
B3 is 1.

Then I would like to write "the" in A3
Can you give me the formula?

The challenge for me is converting field to number for comparison
(convert to clean number, compare size, if smaller than parent write text)

2
  • 2
    Do you mean =IF(DAY(B3)<DAY(B2),"the","")? Apr 20, 2017 at 13:03
  • Yes :-) it's that simple - I should really have figured that out :-) Apr 20, 2017 at 13:06

1 Answer 1

2

You can use DAY function to actually convert date to number of days:

=IF(DAY(B3)<DAY(B2),"the","")

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .