0
votes

I'm creating a file to track the dates and times of arrival of documents. THe data that I have is fed to the pivot table. The options for grouping data allow me to group them by days, months etc. What I need to achieve is different.

I would like the dates to be grouped as follows (by arrival date): -today, - yesterday, - two days ago, -more than two days ago.

I tried to create calculated fields but I was unable to write a proper formula.

Is there any way to achieve that?

Thanks.

1

1 Answers

0
votes

If the dates are in the column A, I would write sometnihg along the lines of:

=IF(TODAY()-A1=1,"yesterday",IF(TODAY()-A1=2;"two days ago");"more than two days ago")

It is hard to give a definitive answer because you didn't provide any insight into what your data looks like, like a screenshot.