Text String Formula Q

  • Thread starter Thread starter Seanie
  • Start date Start date
S

Seanie

I have the formula below that returns the string "Sales for w/e
19/10/08" - depending of course what the value Today()-1 is. How could
I modify that if Today()-1 is anything other than a Sunday value, it
would return the date of the previous Sunday to the one I am now in?
E.g. Today()-1 is 22/10/08 but I would want the date returned as
19/10/08

="Sales for w/e "&TEXT((TODAY()-1),"dd/mm/yy")
 
I have the formula below that returns the string "Sales for w/e
19/10/08" - depending of course what the value Today()-1 is. How could
I modify that if Today()-1 is anything other than a Sunday value, it
would return the date of the previous Sunday to the one I am now in?
E.g. Today()-1 is 22/10/08 but I would want the date returned as
19/10/08

="Sales for w/e "&TEXT((TODAY()-1),"dd/mm/yy")

A general formula would be:

=A1+1-WEEKDAY(A1)

So, in your string, substitute for A1, TODAY()-1.

e.g.

="Sales for w/e "&TEXT((TODAY()-WEEKDAY(TODAY()-1)),"dd/mm/yy")

--ron
 
Thanks Guys, I think Rick yours is the one that actually returns the
correct expected value
 

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